[systemd-devel] setting cpulimit/iolimit on mysql thread not entire process

jai jaimin at webuzo.com
Tue Nov 28 06:27:17 UTC 2023


I am able to set cpulimit, iolimit, etc for a process using its pid through
cgroups v2. But for some threads of a single mysql process, how can I
achieve that?

When I see the database processlist, I get the TID of the mysql queries
executed.
[image: image.png]

I can see those TIDs consuming alot of cpu usage through htop command.
[image: image.png]

I am doing this because I want to set resource limits for some mysql users.
Is there any way I can do this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20231128/690fadb6/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 122669 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20231128/690fadb6/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 42098 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20231128/690fadb6/attachment-0003.png>


More information about the systemd-devel mailing list