From: Stefan Metzmacher Date: Wed, 10 Aug 2022 13:16:14 +0000 (+0000) Subject: s3:g_lock: use TDB_VOLATILE to avoid fcntl locks X-Git-Tag: talloc-2.4.0~1473 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd01f5134696f7789fbc2933629ac2606feb0b5e;p=thirdparty%2Fsamba.git s3:g_lock: use TDB_VOLATILE to avoid fcntl locks This improves 'time smbtorture3 //foo/bar -U% local-g-lock-ping-pong -o 50000000' from ~1.400.000 to ~3.400.000 operations per second any a testsystem. As we also use TDB_VOLATILE for locking.tdb, this is a much more realistic test now. Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index 52a1cf9fa46..d683c4ddee6 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -236,7 +236,7 @@ struct g_lock_ctx *g_lock_ctx_init(TALLOC_CTX *mem_ctx, mem_ctx, db_path, 0, - TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH, + TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH|TDB_VOLATILE, O_RDWR|O_CREAT, 0600, DBWRAP_LOCK_ORDER_3,