brusdev commented on a change in pull request #2868: ARTEMIS-2466
PageSyncTimer::timeSync isn't configurable using ASYNCIO
URL: https://github.com/apache/activemq-artemis/pull/2868#discussion_r338231386
##########
File path:
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
##########
@@ -1002,43 +1003,51 @@ private void applyAddressesAndQueues(HashMap<String,
String> filters) {
private void performAutoTune(HashMap<String, String> filters, JournalType
journalType, File dataFolder) {
if (noAutoTune) {
filters.put("${journal-buffer.settings}", "");
+ filters.put("${page-sync.settings}", "");
} else {
try {
int writes = 250;
System.out.println("");
System.out.println("Auto tuning journal ...");
+ long time = SyncCalculation.syncTest(dataFolder, 4096, writes, 5,
verbose, !noJournalSync, false, "journal-test.tmp",
ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio(), journalType);
+ long nanoseconds = SyncCalculation.toNanos(time, writes, verbose);
+ double writesPerMillisecond = (double) writes / (double) time;
+ String writesPerMillisecondStr = new
DecimalFormat("###.##").format(writesPerMillisecond);
+
+ System.out.println("done! Your system can make " +
writesPerMillisecondStr + " writes per millisecond");
+
if (mapped && noJournalSync) {
HashMap<String, String> syncFilter = new HashMap<>();
syncFilter.put("${nanoseconds}", "0");
syncFilter.put("${writesPerMillisecond}", "0");
syncFilter.put("${maxaio}", journalType == JournalType.ASYNCIO
? "" + ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio() : "1");
- System.out.println("...Since you disabled sync and are using
MAPPED journal, we are diabling buffer times");
+ System.out.println("Since you disabled sync and are using
MAPPED journal, we are disabling buffer times");
filters.put("${journal-buffer.settings}",
readTextFile(ETC_JOURNAL_BUFFER_SETTINGS, syncFilter));
-
} else {
- long time = SyncCalculation.syncTest(dataFolder, 4096, writes,
5, verbose, !noJournalSync, false, "journal-test.tmp",
ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio(), journalType);
- long nanoseconds = SyncCalculation.toNanos(time, writes,
verbose);
- double writesPerMillisecond = (double) writes / (double) time;
-
- String writesPerMillisecondStr = new
DecimalFormat("###.##").format(writesPerMillisecond);
-
HashMap<String, String> syncFilter = new HashMap<>();
syncFilter.put("${nanoseconds}", Long.toString(nanoseconds));
syncFilter.put("${writesPerMillisecond}",
writesPerMillisecondStr);
syncFilter.put("${maxaio}", journalType == JournalType.ASYNCIO
? "" + ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio() : "1");
- System.out.println("done! Your system can make " +
writesPerMillisecondStr +
- " writes per millisecond, your
journal-buffer-timeout will be " + nanoseconds);
+ System.out.println("Your journal-buffer-timeout will be " +
nanoseconds);
Review comment:
I moved that println at line 1018, because the test is always executed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services