Disable sync during iprop receive_everything()
Doing an fsync per-record when receiving the complete HDB is a performance disaster. Among other things, if the HDB is very large, then one slave receving a full HDB can cause other slaves to timeout and, if HDB write activity is high enough to cause iprop log truncation, then also need full syncs, which leads to a cycle of full syncs for all slaves until HDB write activity drops. Allowing the iprop log to be larger helps, but improving receive_everything() performance helps even more.
This commit is contained in:
@@ -512,6 +512,8 @@ receive_everything(krb5_context context, int fd,
|
||||
if (ret)
|
||||
krb5_err(context, IPROPD_RESTART, ret, "db->open");
|
||||
|
||||
(void) mydb->hdb_set_sync(context, mydb, 0);
|
||||
|
||||
sp = NULL;
|
||||
krb5_data_zero(&data);
|
||||
do {
|
||||
@@ -563,6 +565,9 @@ receive_everything(krb5_context context, int fd,
|
||||
|
||||
reinit_log(context, server_context, vno);
|
||||
|
||||
ret = mydb->hdb_set_sync(context, mydb, 1);
|
||||
if (ret)
|
||||
krb5_err(context, IPROPD_RESTART_SLOW, ret, "failed to sync the received HDB");
|
||||
ret = mydb->hdb_close(context, mydb);
|
||||
if (ret)
|
||||
krb5_err(context, IPROPD_RESTART_SLOW, ret, "db->close");
|
||||
|
Reference in New Issue
Block a user