summaryrefslogtreecommitdiff
path: root/sql/log.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-07-16 12:45:30 +0300
committerMonty <monty@mariadb.org>2020-07-23 10:54:32 +0300
commit26824581281fcb2b2251585d8081de38d561ca93 (patch)
tree429a399fc66e8066f76864a7df5a66fa2c1ba623 /sql/log.h
parentc89e927a5675bd1e84a9c5dd02f5d649e829453e (diff)
downloadmariadb-git-26824581281fcb2b2251585d8081de38d561ca93.tar.gz
Use larger buffer when reading binary and relay logs
- Should speed up replication
Diffstat (limited to 'sql/log.h')
-rw-r--r--sql/log.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/log.h b/sql/log.h
index 063513fe908..58e681985eb 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -295,6 +295,12 @@ enum enum_log_type { LOG_UNKNOWN, LOG_NORMAL, LOG_BIN };
enum enum_log_state { LOG_OPENED, LOG_CLOSED, LOG_TO_BE_OPENED };
/*
+ Use larger buffers when reading from and to binary log
+ We make it one step smaller than 64K to account for malloc overhead.
+*/
+#define LOG_BIN_IO_SIZE MY_ALIGN_DOWN(65536-1, IO_SIZE)
+
+/*
TODO use mmap instead of IO_CACHE for binlog
(mmap+fsync is two times faster than write+fsync)
*/