[systemd-devel] systemd and mysql with large memory pages
Reindl Harald
h.reindl at thelounge.net
Sat Sep 17 04:51:50 PDT 2011
thank you!
after a reboot the changes in "/etc/security/limits.conf", "/etc/sysctl.conf"
and "mysqld.service" are working, what i never understood is "hugetlb_shm_group"
because what if you have more thane one software wanting use Hughe TLB, anyways
this is off topic....
regards from vienna
Am 17.09.2011 13:36, schrieb "Jóhann B. Guðmundsson":On 09/17/2011 10:57 AM, Reindl Harald wrote:
> with sysv/lsb you could include the follwoing script via "source"
> and hughe TLB in mysqld worked like a charme
>
> [root at rh:~]$ cat /etc/my.memory.cnf
> # Large-Memory-Pages
> echo 200> /proc/sys/vm/nr_hugepages
> echo 27> /proc/sys/vm/hugetlb_shm_group
> echo 2097152> /proc/sys/kernel/shmall
> ulimit -l unlimited
> ulimit -n 30000
> _____________
>
> calling this via "ExecStartPre" does not work
> so HOW do this on a systemd-environment if your mysqld
> has a hughe key_buffer size?
File a bug against the mysql since this really is not a systemd problem and the unit needs to be fixed to source
that file however it comes as a bit odd if this is done via script ( I have yet to find a maintainer that can
explain to me why or what warrants having things like this in a script ).
What you do is you edit /etc/sysctl.conf and /etc/security/limits.conf and set the desired setting there which is
the proper way of doing this stuff since you rarely change them.
So for /proc/sys/vm/nr_hugepages,/proc/sys/vm/hugetlb_shm_group, /proc/sys/kernel/shmall you add or edit in
/etc/sysctl.conf
vm.nr_hugepages=200
vm.hugetlb_shm_group=27
kernel.shmal=2097152l
For ulimit you edit /etc/security/limits.conf
@mysql soft memlock unlimited
@mysql hard memlock unlimited
And for "ulimit -n 30000" you can add to the unit file LimitNOFILE=30000
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110917/bb7e5672/attachment.pgp>
More information about the systemd-devel
mailing list