mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
Merge remote-tracking branch 'upstream/develop' into open_case_resources
This commit is contained in:
commit
c7c7618717
@ -34,37 +34,25 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
AutopsyOptionsPanel() {
|
AutopsyOptionsPanel() {
|
||||||
initComponents();
|
initComponents();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Profiling has shown that contention for I/O resources and for the
|
||||||
|
* case database limits the number of threads that can do meaningful
|
||||||
|
* work during ingest. If Autopsy was compute-bound, adding more threads
|
||||||
|
* on machines with enough processors might help, but currently, after
|
||||||
|
* four threads, performance actually stays flat and then starts to
|
||||||
|
* degrade.
|
||||||
|
*/
|
||||||
int availableProcessors = Runtime.getRuntime().availableProcessors();
|
int availableProcessors = Runtime.getRuntime().availableProcessors();
|
||||||
Integer fileIngestThreadCountChoices[];
|
Integer fileIngestThreadCountChoices[];
|
||||||
int recommendedFileIngestThreadCount;
|
int recommendedFileIngestThreadCount;
|
||||||
if (availableProcessors >= 16) {
|
if (availableProcessors >= 6) {
|
||||||
fileIngestThreadCountChoices = new Integer[]{1, 2, 4, 6, 8, 12, 16};
|
fileIngestThreadCountChoices = new Integer[]{1, 2, 4};
|
||||||
if (availableProcessors >= 18) {
|
|
||||||
recommendedFileIngestThreadCount = 16;
|
|
||||||
} else {
|
|
||||||
recommendedFileIngestThreadCount = 12;
|
|
||||||
}
|
|
||||||
} else if (availableProcessors >= 12 && availableProcessors <= 15) {
|
|
||||||
fileIngestThreadCountChoices = new Integer[]{1, 2, 4, 6, 8, 12};
|
|
||||||
if (availableProcessors >= 14) {
|
|
||||||
recommendedFileIngestThreadCount = 12;
|
|
||||||
} else {
|
|
||||||
recommendedFileIngestThreadCount = 8;
|
|
||||||
}
|
|
||||||
} else if (availableProcessors >= 8 && availableProcessors <= 11) {
|
|
||||||
fileIngestThreadCountChoices = new Integer[]{1, 2, 4, 6, 8};
|
|
||||||
if (availableProcessors >= 10) {
|
|
||||||
recommendedFileIngestThreadCount = 8;
|
|
||||||
} else {
|
|
||||||
recommendedFileIngestThreadCount = 6;
|
|
||||||
}
|
|
||||||
} else if (availableProcessors >= 6 && availableProcessors <= 7) {
|
|
||||||
fileIngestThreadCountChoices = new Integer[]{1, 2, 4, 6};
|
|
||||||
recommendedFileIngestThreadCount = 4;
|
recommendedFileIngestThreadCount = 4;
|
||||||
} else if (availableProcessors >= 4 && availableProcessors <= 5) {
|
} else if (availableProcessors >= 4 && availableProcessors < 6) {
|
||||||
fileIngestThreadCountChoices = new Integer[]{1, 2, 4};
|
fileIngestThreadCountChoices = new Integer[]{1, 2, 4};
|
||||||
recommendedFileIngestThreadCount = 2;
|
recommendedFileIngestThreadCount = 2;
|
||||||
} else if (availableProcessors >= 2 && availableProcessors <= 3) {
|
} else if (availableProcessors >= 2 && availableProcessors < 4) {
|
||||||
fileIngestThreadCountChoices = new Integer[]{1, 2};
|
fileIngestThreadCountChoices = new Integer[]{1, 2};
|
||||||
recommendedFileIngestThreadCount = 1;
|
recommendedFileIngestThreadCount = 1;
|
||||||
} else {
|
} else {
|
||||||
@ -72,7 +60,9 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
|
|||||||
recommendedFileIngestThreadCount = 1;
|
recommendedFileIngestThreadCount = 1;
|
||||||
}
|
}
|
||||||
numberOfFileIngestThreadsComboBox.setModel(new DefaultComboBoxModel<>(fileIngestThreadCountChoices));
|
numberOfFileIngestThreadsComboBox.setModel(new DefaultComboBoxModel<>(fileIngestThreadCountChoices));
|
||||||
|
|
||||||
restartRequiredLabel.setText(NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.restartRequiredLabel.text", recommendedFileIngestThreadCount));
|
restartRequiredLabel.setText(NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.restartRequiredLabel.text", recommendedFileIngestThreadCount));
|
||||||
|
|
||||||
// TODO listen to changes in form fields and call controller.changed()
|
// TODO listen to changes in form fields and call controller.changed()
|
||||||
DocumentListener docListener = new DocumentListener() {
|
DocumentListener docListener = new DocumentListener() {
|
||||||
|
|
||||||
@ -92,7 +82,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.jFormattedTextFieldProcTimeOutHrs.getDocument().addDocumentListener(docListener);
|
this.jFormattedTextFieldProcTimeOutHrs.getDocument().addDocumentListener(docListener);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void load() {
|
void load() {
|
||||||
@ -138,7 +128,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
|
|||||||
UserPreferences.setProcessTimeOutHrs((int) timeOutHrs);
|
UserPreferences.setProcessTimeOutHrs((int) timeOutHrs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean valid() {
|
boolean valid() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user