[systemd-devel] systemd and mysql with large memory pages

Lennart Poettering lennart at poettering.net
Mon Sep 19 10:39:20 PDT 2011


On Sat, 17.09.11 11:36, "Jóhann B. Guðmundsson" (johannbg at gmail.com) wrote:

> 
> 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

Much nicer is dropping in a new file /etc/sysctl.d/, so that it never is
overriden at package upgrades, and creates no conflicts.

> /etc/security/limits.conf and set the desired setting there which is
> the proper way of doing this stuff since you rarely change them.

limits.conf is generally only applied to logins, not to system services.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list