You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/01/27 15:20:29 UTC

[GitHub] [nifi-minifi-cpp] arpadboda opened a new pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

arpadboda opened a new pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715
 
 
   …repo
   
   Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced
        in the commit message?
   
   - [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371309009
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.h
 ##########
 @@ -103,6 +105,9 @@ class FlowFileRepository : public core::Repository, public std::enable_shared_fr
     options.create_if_missing = true;
     options.use_direct_io_for_flush_and_compaction = true;
     options.use_direct_reads = true;
+    options.write_buffer_size = 8 << 20;
 
 Review comment:
   This is the important part of this PR.
   
   When operations are done in rocksdb, it stores them in an unsorted list of events. The buffer getting full means that these events should be merged and serialized, so records are written to the disk in the regular structure of rocksdb. 
   
   In our case it means two things:
   -During our regular usecase the content of the buffer in continuously growing as creation and later deletion of the same element results in two events added to the buffer (log). 
   -When the buffer is full and events are merged, there is a CPU spike and the result (nothing or nearly nothing in our case) is written to the underlying storage. 
   
   As this buffer only contains flowfile metadata (attributes and content location), it's filled quite slowly. It takes hours in case 10 flowfiles are generated / sec. 
   
   To avoid memory usage going that high (FF repo can consume more than the rest of whole MiNiFI when the buffer is close to full) and have smaller CPU peaks the buffer is now emptied more frequently. This still means minutes with a decent load. 
   
   For more information check this: https://github.com/facebook/rocksdb/wiki/Memory-usage-in-RocksDB#memtable
   (Note: write amplification doesn't matter in our case as we usually persist negligible amount of data as flowfiles fade out of the system in a very short time)
   
   The logging added in this PR logs the current write buffer usage as well. It helps monitoring the peaks. 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371310031
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -69,14 +68,8 @@ void FlowFileRepository::flush() {
     batch.Delete(keys[i]);
   }
 
-
-  if (db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
-    logger_->log_trace("Decrementing %u from a repo size of %u", decrement_total, repo_size_.load());
-    if (decrement_total > repo_size_.load()) {
-      repo_size_ = 0;
-    } else {
-      repo_size_ -= decrement_total;
-    }
+  if (!db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
+    logger_->log_warn("Failed to execute batch operation when flushing FlowFileRepository");
 
 Review comment:
   I removed size handling as:
   - It was done in a inconsistent way.
   - Even if the repo_full flag was set, nothing happened, new elements were inserted. 
   - Handling repo size out of the repo (without taking the size of keys into account) is most probably a bad design.
   
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r372360823
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -89,23 +82,28 @@ void FlowFileRepository::flush() {
   }
 }
 
-void FlowFileRepository::run() {
-  // threshold for purge
+void FlowFileRepository::printStats() {
 
 Review comment:
   I'd also suggest logging the stats in a single line. It reduces log spam while keeping usefulness.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371838161
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.h
 ##########
 @@ -105,8 +105,15 @@ class FlowFileRepository : public core::Repository, public std::enable_shared_fr
     options.create_if_missing = true;
     options.use_direct_io_for_flush_and_compaction = true;
     options.use_direct_reads = true;
+
+    // Write buffers are used as db oepration logs. When they get filled the events are merged and serialized.
 
 Review comment:
   typo: oepration -> operation

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371693362
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -89,23 +82,28 @@ void FlowFileRepository::flush() {
   }
 }
 
-void FlowFileRepository::run() {
-  // threshold for purge
+void FlowFileRepository::printStats() {
 
 Review comment:
   If I understand correctly, this is ran every purge_period, which is, by default, 2.5 s.
   4 log lines every 2.5 seconds is way too much noise, affecting everyone, as virtually everyone uses this FlowFileRepo and the default log level is info. This would account for the majority of logs in many cases.
   I think this should definitely be at debug level.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371838409
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.h
 ##########
 @@ -105,8 +105,15 @@ class FlowFileRepository : public core::Repository, public std::enable_shared_fr
     options.create_if_missing = true;
     options.use_direct_io_for_flush_and_compaction = true;
     options.use_direct_reads = true;
+
+    // Write buffers are used as db oepration logs. When they get filled the events are merged and serialized.
+    // The default size is 64MB.
+    // In our case it's usually too much, causing sawtooth in memory consumption. (Consumes more than the whole MiniFi)
+    // To avoid DB write issues during heavy load it's recommended to have high number of buffer.
+    // Rocksdb's stall featur can also trigger in case the number of buffers is >= 3.
 
 Review comment:
   typo: featur -> feature

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371702847
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.h
 ##########
 @@ -103,6 +105,9 @@ class FlowFileRepository : public core::Repository, public std::enable_shared_fr
     options.create_if_missing = true;
     options.use_direct_io_for_flush_and_compaction = true;
     options.use_direct_reads = true;
+    options.write_buffer_size = 8 << 20;
 
 Review comment:
   I would like to see more in-code comments about the rationale behind these values.
   Why 8 MB? Why do we set max_write_buffer_number to 4? As far as I understand that means it can keep 4 of these memtables in memory, and the default is 2.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r374684866
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -97,23 +91,33 @@ void FlowFileRepository::flush() {
   }
 }
 
-void FlowFileRepository::run() {
-  // threshold for purge
+void FlowFileRepository::printStats() {
+  std::string key_count;
+  db_->GetProperty("rocksdb.estimate-num-keys", &key_count);
+
+  std::string table_readers;
+  db_->GetProperty("rocksdb.estimate-table-readers-mem", &table_readers);
+
+  std::string all_memtables;
+  db_->GetProperty("rocksdb.cur-size-all-mem-tables", &all_memtables);
+
+  logger_->log_info("Repository stats: key count: %zu, table readers size: %zu, all memory tables size: %zu",
+      key_count, table_readers, all_memtables);
+}
 
+void FlowFileRepository::run() {
+  auto last = std::chrono::system_clock::now();
 
 Review comment:
   Done. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on issue #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on issue #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#issuecomment-581905858
 
 
   > Did anything significant change since my last approve?
   
   Just rebased to master to resolve conflict. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371310031
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -69,14 +68,8 @@ void FlowFileRepository::flush() {
     batch.Delete(keys[i]);
   }
 
-
-  if (db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
-    logger_->log_trace("Decrementing %u from a repo size of %u", decrement_total, repo_size_.load());
-    if (decrement_total > repo_size_.load()) {
-      repo_size_ = 0;
-    } else {
-      repo_size_ -= decrement_total;
-    }
+  if (!db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
+    logger_->log_warn("Failed to execute batch operation when flushing FlowFileRepository");
 
 Review comment:
   I removed size handling as:
   - It was done in an inconsistent way.
   - Even if the repo_full flag was set, nothing happened, new elements were inserted. 
   - Handling repo size out of the repo (without taking the size of keys into account) is most probably a bad design.
   
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371745162
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -89,23 +82,28 @@ void FlowFileRepository::flush() {
   }
 }
 
-void FlowFileRepository::run() {
-  // threshold for purge
+void FlowFileRepository::printStats() {
 
 Review comment:
   Fair point.
   
   I would keep it at info level, but call less frequently. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r372505686
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -89,23 +82,28 @@ void FlowFileRepository::flush() {
   }
 }
 
-void FlowFileRepository::run() {
-  // threshold for purge
+void FlowFileRepository::printStats() {
 
 Review comment:
   Now it's single line. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r374670499
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -97,23 +91,33 @@ void FlowFileRepository::flush() {
   }
 }
 
-void FlowFileRepository::run() {
-  // threshold for purge
+void FlowFileRepository::printStats() {
+  std::string key_count;
+  db_->GetProperty("rocksdb.estimate-num-keys", &key_count);
+
+  std::string table_readers;
+  db_->GetProperty("rocksdb.estimate-table-readers-mem", &table_readers);
+
+  std::string all_memtables;
+  db_->GetProperty("rocksdb.cur-size-all-mem-tables", &all_memtables);
+
+  logger_->log_info("Repository stats: key count: %zu, table readers size: %zu, all memory tables size: %zu",
+      key_count, table_readers, all_memtables);
+}
 
+void FlowFileRepository::run() {
+  auto last = std::chrono::system_clock::now();
 
 Review comment:
   Please use `std::chrono::steady_clock`, system_clock is not monotonic and not suitable for measuring intervals.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371749842
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -69,14 +68,8 @@ void FlowFileRepository::flush() {
     batch.Delete(keys[i]);
   }
 
-
-  if (db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
-    logger_->log_trace("Decrementing %u from a repo size of %u", decrement_total, repo_size_.load());
-    if (decrement_total > repo_size_.load()) {
-      repo_size_ = 0;
-    } else {
-      repo_size_ -= decrement_total;
-    }
+  if (!db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
+    logger_->log_warn("Failed to execute batch operation when flushing FlowFileRepository");
 
 Review comment:
   https://issues.apache.org/jira/browse/MINIFICPP-1129

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda closed pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda closed pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
bakaid commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371703217
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -69,14 +68,8 @@ void FlowFileRepository::flush() {
     batch.Delete(keys[i]);
   }
 
-
-  if (db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
-    logger_->log_trace("Decrementing %u from a repo size of %u", decrement_total, repo_size_.load());
-    if (decrement_total > repo_size_.load()) {
-      repo_size_ = 0;
-    } else {
-      repo_size_ -= decrement_total;
-    }
+  if (!db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
+    logger_->log_warn("Failed to execute batch operation when flushing FlowFileRepository");
 
 Review comment:
   Agreed, but I think it is something we would need, done properly. Is there a follow-up issues for it?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r372505686
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -89,23 +82,28 @@ void FlowFileRepository::flush() {
   }
 }
 
-void FlowFileRepository::run() {
-  // threshold for purge
+void FlowFileRepository::printStats() {
 
 Review comment:
   Now it's single line and printed less frequently.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r372506095
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.h
 ##########
 @@ -103,6 +105,9 @@ class FlowFileRepository : public core::Repository, public std::enable_shared_fr
     options.create_if_missing = true;
     options.use_direct_io_for_flush_and_compaction = true;
     options.use_direct_reads = true;
+    options.write_buffer_size = 8 << 20;
 
 Review comment:
   Added a long comment to explain the decision behind. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services