All of lore.kernel.org
 help / color / mirror / Atom feed
* dm-crypt performance regression due to workqueue changes
@ 2024-06-29 18:15 Mikulas Patocka
  2024-06-29 18:29 ` Waiman Long
  2024-06-30 17:13 ` Tejun Heo
  0 siblings, 2 replies; 16+ messages in thread
From: Mikulas Patocka @ 2024-06-29 18:15 UTC (permalink / raw)
  To: Tejun Heo, Lai Jiangshan
  Cc: Waiman Long, Mike Snitzer, Laurence Oberman, Jonathan Brassow,
	Ming Lei, Ondrej Kozina, Milan Broz, linux-kernel, dm-devel

Hi

I report that the patch 63c5484e74952f60f5810256bd69814d167b8d22 
("workqueue: Add multiple affinity scopes and interface to select them") 
is causing massive dm-crypt slowdown in virtual machines.

Steps to reproduce:
* Install a system in a virtual machine with 16 virtual CPUs
* Create a scratch file with "dd if=/dev/zero of=Scratch.img bs=1M
  count=2048 oflag=direct" - the file should be on a fast NVMe drive
* Attach the scratch file to the virtual machine as /dev/vdb; cache mode
  should be 'none'
* cryptsetup --force-password luksFormat /dev/vdb
* cryptsetup luksOpen /dev/vdb cr
* fio --direct=1 --bsrange=128k-128k --runtime=40 --numjobs=1
  --ioengine=libaio --iodepth=8 --group_reporting=1
  --filename=/dev/mapper/cr --name=job --rw=read

With 6.5, we get 3600MiB/s; with 6.6 we get 1400MiB/s.

The reason is that virt-manager by default sets up a topology where we 
have 16 sockets, 1 core per socket, 1 thread per core. And that workqueue 
patch avoids moving work items across sockets, so it processes all 
encryption work only on one virtual CPU.

The performance degradation may be fixed with "echo 'system'
>/sys/module/workqueue/parameters/default_affinity_scope" - but it is 
regression anyway, as many users don't know about this option.

How should we fix it? There are several options:
1. revert back to 'numa' affinity
2. revert to 'numa' affinity only if we are in a virtual machine
3. hack dm-crypt to set the 'numa' affinity for the affected workqueues
4. any other solution?

Mikulas


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Thread for updating minor properties of tracked regressions [consider ignoring it!]
@ 2024-03-09 10:18 Thorsten Leemhuis
  2024-07-07 22:54 ` Christian Heusel
  0 siblings, 1 reply; 16+ messages in thread
From: Thorsten Leemhuis @ 2024-03-09 10:18 UTC (permalink / raw)
  To: Linux kernel regressions list

Hi! This is the start of a thread I'll use for updating minor properties
of regressions tracked by regzbot. Consider telling your mailer to
ignore this thread, the replies are unlikely to be of relevance for you,
but done here to ensure a public paper trail.

Interacting with regzbot from arbitrary places is a recently added
feature of regzbot usable via the new '#regzbot report <url>' command.
The indented use of this feature is for updating minor aspect of
regressions already tracked, e.g. "change the title" or "tell regzbot
about a related discussion". Such things until now had to be done using
regzbot commands in a direct or indirect reply to report -- but there
they would mainly be noise for most others and just add to the huge
amount of mail people already get. It's also takes a more time to send a
lot of individual mails instead of preparing just one.

The new command will be documented on
https://gitlab.com/knurd42/regzbot/ once it got a bit more testing.

Ciao, Thorsten

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-07-09  7:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-29 18:15 dm-crypt performance regression due to workqueue changes Mikulas Patocka
2024-06-29 18:29 ` Waiman Long
2024-06-30  9:49   ` Mikulas Patocka
2024-06-30 14:35     ` Waiman Long
2024-06-30 17:13 ` Tejun Heo
2024-06-30 18:49   ` Mikulas Patocka
2024-07-01 12:48     ` Michal Prívozník
2024-07-01 13:25       ` Daniel P. Berrangé
2024-07-01 13:40         ` Mikulas Patocka
2024-07-01 13:08     ` Daniel P. Berrangé
2024-07-01 13:42       ` Mikulas Patocka
2024-07-01 13:52         ` Daniel P. Berrangé
2024-07-01 17:25           ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2024-03-09 10:18 Thread for updating minor properties of tracked regressions [consider ignoring it!] Thorsten Leemhuis
2024-07-07 22:54 ` Christian Heusel
2024-07-08  7:08   ` dm-crypt performance regression due to workqueue changes (was: Re: Thread for updating minor properties of tracked regressions [consider ignoring it!]) Thorsten Leemhuis
2024-07-08 10:51     ` Christian Heusel
2024-07-08 11:16       ` dm-crypt performance regression due to workqueue changes Thorsten Leemhuis
2024-07-08 17:03         ` Christian Heusel
2024-07-09  7:53           ` Thorsten Leemhuis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.