Hi Andrzej,
What operating system is this on? I suspect maybe it's that the locks or mmaps are significantly more expensive on this platform than on the places I've used it.
Also if you can give specifics of your config that might help a lot in tracking down what's going on.
I wonder if setting
reverseacls: true
in your imapd.conf might fix this. If it's locking and unlocking that frequently then it seems like maybe it's doing a mailbox scan that we could be avoiding.Cheers,
Bron.
On Fri, Nov 5, 2021, at 10:20, Andrzej Kwiatkowski wrote:
Before Upgrade on old 2.5.x cyrus we have about 250k mailboxes withabout 500k folders.We made upgrade with imapsync , because of problem with pathcompatibility with unixhierarchysep set on yes.After upgrade to 3.4.2 we have problem that fcntl locks on mailboxes.dbare very long. For tests we have made copy of one production servers,and run without load, reconstruct for empty mailbox lasts 4-5 seconds,and strace shows us:fcntl(3, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fcntl(3, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fstat(3, {st_mode=S_IFREG|0600, st_size=104625064, ...}) = 0stat("/store/usermailboxes//config/mailboxes.db", {st_mode=S_IFREG|0600,st_size=104625064, ...}) = 0fcntl(3, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fcntl(3, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fstat(3, {st_mode=S_IFREG|0600, st_size=104625064, ...}) = 0stat("/store/usermailboxes//config/mailboxes.db", {st_mode=S_IFREG|0600,st_size=104625064, ...}) = 0fcntl(3, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fcntl(3, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fstat(3, {st_mode=S_IFREG|0600, st_size=104625064, ...}) = 0stat("/store/usermailboxes//config/mailboxes.db", {st_mode=S_IFREG|0600,st_size=104625064, ...}) = 0fcntl(3, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fcntl(3, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fstat(3, {st_mode=S_IFREG|0600, st_size=104625064, ...}) = 0stat("/store/usermailboxes//config/mailboxes.db", {st_mode=S_IFREG|0600,st_size=104625064, ...}) = 0fcntl(3, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fcntl(3, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fstat(3, {st_mode=S_IFREG|0600, st_size=104625064, ...}) = 0stat("/store/usermailboxes//config/mailboxes.db", {st_mode=S_IFREG|0600,st_size=104625064, ...}) = 0fcntl(3, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fcntl(3, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fstat(3, {st_mode=S_IFREG|0600, st_size=104625064, ...}) = 0stat("/store/usermailboxes//config/mailboxes.db", {st_mode=S_IFREG|0600,st_size=104625064, ...}) = 0fcntl(3, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fcntl(3, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=0,l_len=0}) = 0fstat(3, {st_mode=S_IFREG|0600, st_size=104625064, ...}) = 0For reconstruct single mailbox there is sometimes 27k operation for RDLCK.One of our server have database with only 50k folders, and there iseverythink ok.We also made dump, restore mailboxes.db, conversion toskipstamp and back for twoskip.Without progress. With zeroskip is much worse.We also test on XFS,EXT4. Mailboxes.db on ramdisk for removing diskperformance issue..Any idea ?RegardsAK------------------------------------------Cyrus: InfoDelivery options: https://cyrus.topicbox.com/groups/info/subscription
--
Bron Gondwana, CEO, Fastmail Pty Ltd
brong@xxxxxxxxxxxxxxxx