aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/disk_log.hrl
diff options
context:
space:
mode:
authorRichard Carlsson <[email protected]>2016-11-01 15:36:57 +0100
committerRichard Carlsson <[email protected]>2016-11-29 10:31:43 +0100
commiteda5c4859f561fae7d3a3b74f19dd8596c212966 (patch)
treec957eb3248ceb4618fe062af90d28201faf58a48 /lib/kernel/src/disk_log.hrl
parent5a8a1a963edd6d6dbb35bf615a4bad7d77041443 (diff)
downloadotp-eda5c4859f561fae7d3a3b74f19dd8596c212966.tar.gz
otp-eda5c4859f561fae7d3a3b74f19dd8596c212966.tar.bz2
otp-eda5c4859f561fae7d3a3b74f19dd8596c212966.zip
Improve caching in disk_log
Avoid starting timers for flushing when the written data is empty or larger than the max cache size. Previously, a single huge write to an empty cache would be put in the cache until the next write or the timer event. Also increase the cache size from 16K to 64K.
Diffstat (limited to 'lib/kernel/src/disk_log.hrl')
-rw-r--r--lib/kernel/src/disk_log.hrl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/kernel/src/disk_log.hrl b/lib/kernel/src/disk_log.hrl
index 3cf8a3b3a2..593dbb31ab 100644
--- a/lib/kernel/src/disk_log.hrl
+++ b/lib/kernel/src/disk_log.hrl
@@ -39,6 +39,7 @@
-define(MAX_FILES, 65000).
-define(MAX_BYTES, ((1 bsl 64) - 1)).
-define(MAX_CHUNK_SIZE, 65536).
+-define(MAX_FWRITE_CACHE, 65536).
%% Object defines
-define(LOGMAGIC, <<1,2,3,4>>).