Commit 30c826e5 authored by Leigh Stoller's avatar Leigh Stoller

Mothership specific tuning parameters to mysqld startup.

parent 932a2f44
......@@ -5,6 +5,8 @@
# BEFORE: DAEMON
# KEYWORD: shutdown
MAINSITE="@TBMAINSITE@"
# On FreeBSD 6.X we need to wrap the wrapper with daemon to prevent HUP signal
fbsdvers=`uname -v | sed -e 's/FreeBSD \([0-9][0-9]*\).*/FreeBSD\1/'`
......@@ -18,7 +20,18 @@ else
safeprog=/usr/local/bin/safe_mysqld
fi
options="--pid-file=/var/db/mysql/mysqld.pid --skip-grant-tables --skip-networking --user=mysql --log-long-format --log=@prefix@/log/mysql/base --log-bin=@prefix@/log/mysql/update --log-slow-queries=@prefix@/log/mysql/slowqueries -O max_connections=500 -O long_query_time=2 -O key_buffer=32M -O table_cache=256 -O sort_buffer=4M -O record_buffer=1M"
if [ $MAINSITE == "0" ]; then
opts="-O key_buffer=32M -O table_cache=128 -O sort_buffer=2M"
opts="$opts -O record_buffer=1M -O max_connections=250"
else
opts="-O key_buffer=256M -O table_cache=256 -O sort_buffer=4M"
opts="$opts -O record_buffer=1M -O query_cache_size=16M"
opts="$opts -O join_buffer_size=256K -O thread_cache_size=4"
opts="$opts -O tmp_table_size=32M -O max_heap_table_size=32M"
opts="$opts -O max_connections=350"
fi
options="--pid-file=/var/db/mysql/mysqld.pid --skip-innodb --skip-grant-tables --skip-networking --user=mysql --log-long-format --log=@prefix@/log/mysql/base --log-bin=@prefix@/log/mysql/update --log-slow-queries=@prefix@/log/mysql/slowqueries -O long_query_time=2 $opts"
case "$1" in
start|faststart|quietstart|onestart|forcestart)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment