Sample Header Ad - 728x90

MySQL: mysqld_safe options

3 votes
1 answer
2983 views
Is there a way to specify these options in configuration file? I've tried to add them into [mysqld_safe] section but it doesn't work: [mysqld_safe] numa-interleave = 1 flush-caches = 1 - # ps -ww -lfC mysqld_safe F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 4 S root 17180 1 0 80 0 - 26549 wait 15:06 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/mysql.pid Please note that I'm using Percona server 5.5.30-30.2 **EDIT: 28 Aug 2013 - 08:34:** Unfortunately I can't find this line in /etc/init.d/mysql: # grep -n "interleave" < /etc/init.d/mysql # echo $? 1 I'm able to manually invoke these options: mysqld_safe --datadir=/mnt/data/mysql --pid-file=/mnt/data/mysql/db3.improve.pid --numa-interleave --flush-caches but with option file there is still default policy # cat /proc/$(pidof mysqld)/numa_maps | cut -d ' ' -f 2 | uniq default There must be some way other than hard coding these options into init script or manually staring MySQL daemon... **EDIT: 29 Aug 2013 - 08:38:** I've just tested it with Percona Server 5.5.28-29.1. I still don't see numa related entries in /etc/init.d/mysql however there are in mysqld_safe script: # grep -n "interleave" /usr/bin/mysqld_safe 21:numa_interleave=0 67: --numa-interleave Run mysqld with its memory interleaved 215: --numa-interleave) numa_interleave=1 ;; 777:# Set mysqld's memory interleave policy. 780:if true && test $numa_interleave -eq 1 785: log_error "numactl command not found, required for --numa-interleave" 788: elif ! numactl --interleave=all true 794: cmd="$cmd numactl --interleave=all" 795:elif test $numa_interleave -eq 1 797: log_error "--numa-interleave is not supported on this platform" I've tested other options like nice, open_files_limit and they work fine so it looks like the only option is to hard-code it into init script
Asked by HTF (451 rep)
Aug 27, 2013, 02:59 PM
Last activity: Aug 29, 2013, 07:39 AM