# Performance problems continue

## SweepingOar

I'm having some performance issues that have come up in the past few months after an update of mysql and php. It seems that the system is much slower now that mysqld runs as a single process rather than spawning many. The server hosts a php/mysql site with a little bit of traffic, not too much, maybe 2-3000 visitors per day. I'm seeing a lot of stuff like the following when I run top:

```
top - 15:44:15 up 46 days, 16:57,  2 users,  load average: 0.21, 0.36, 0.45

Tasks:  73 total,   1 running,  72 sleeping,   0 stopped,   0 zombie

Cpu(s): 31.6%us,  1.7%sy,  0.0%ni, 62.1%id,  4.3%wa,  0.0%hi,  0.3%si,  0.0%st

Mem:    967840k total,   951888k used,    15952k free,    89488k buffers

Swap:  2007992k total,     1604k used,  2006388k free,   697908k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

 6608 mysql     20   0  166m  63m 5364 S 26.0  6.7   4935:31 mysqld

10411 apache    20   0 32996   9m 2844 S  1.3  1.1   0:00.04 apache2

 9591 revhq     20   0  2252 1104  848 R  0.7  0.1   0:01.38 top

 9944 apache    20   0 33468  10m 2920 S  0.7  1.1   0:00.64 apache2

10220 apache    20   0 33292  10m 3484 S  0.7  1.2   0:00.66 apache2

10405 apache    20   0 33228  10m 2812 S  0.7  1.1   0:00.04 apache2

    1 root      20   0  1596  552  476 S  0.0  0.1   0:31.44 init

    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd

    3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0

    4 root      15  -5     0    0    0 S  0.0  0.0   0:01.56 ksoftirqd/0

    5 root      15  -5     0    0    0 S  0.0  0.0   2:26.39 events/0

    6 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper

   82 root      15  -5     0    0    0 S  0.0  0.0   0:03.28 kblockd/0

   85 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid

   86 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify

  163 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0

  164 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ata_aux

  165 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd

  171 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khubd

  174 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod

  214 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pdflush

  216 root      15  -5     0    0    0 S  0.0  0.0   0:08.96 kswapd0

  217 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0

  903 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_0

  905 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_1  
```

Usually it's not this bad, but there are times when it drops to 20% idle too. Today I ran:

```
nice -20 grep -r blahblahblah *
```

and it dropped the idle down to zero and the wait was something like 90%. I had first run grep without nice and the result was pretty much the same.

I was thinking that I might have a hardware issue, but I've got two different machines running pretty much the same system and I'm getting similar results from both of them. One is a P4 2.4 ghz and the other is a Core 2 duo 2.x ghz. Both are running sata software raid 1 (dma is enabled for both drives in both machines).

The mysql tables are all MyIsam and the indexes were rebuilt. Most tables have below 10,000 records and most querys use optimized straight joins.

----------

## Keruskerfuerst

Try to run 

emerge -e world on both machines.

----------

## SweepingOar

My USE flags haven't changed and I've re-installed a few times on the test machine with no better performance. At this point I think it's probably either hardware, the new version of mysql (5.0.54) or the way the code on our site has been written. Does anything look odd?

```
# more /etc/make.conf

# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /etc/make.conf.example for a more detailed example.

CFLAGS="-O2 -pipe"

CXXFLAGS="-O2 -pipe"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

# These are the USE flags that were used in addition to what is provided by the

# profile used for building.

USE="-gtk -gnome mmx sse sse2 symlink apache2 berkdb crypt curl emacs gdbm gif imagemagick jpeg

maildir multilib mysql mysqli nptl nptlonly pam pcre perl png python readline sasl session

spell spl ssl tcpd unicode xml zlib tiff"

MAKEOPTS="-j2"
```

```
# emerge -ep world   

These are the packages that would be merged, in order:

Calculating world dependencies... done!

[ebuild   R   ] sys-apps/portage-2.1.4.4  

[ebuild   R   ] sys-libs/zlib-1.2.3-r1  

[ebuild   R   ] virtual/libintl-0  

[ebuild   R   ] sys-devel/gnuconfig-20070724  

[ebuild   R   ] virtual/libiconv-0  

[ebuild   R   ] dev-util/pkgconfig-0.22  

[ebuild   R   ] app-arch/bzip2-1.0.5  

[ebuild  N    ] app-arch/lzma-utils-4.32.5  USE="-nocxx" 

[ebuild   R   ] dev-libs/expat-2.0.1  

[ebuild   R   ] dev-libs/gmp-4.2.2  

[ebuild   R   ] sys-apps/tcp-wrappers-7.6-r8  

[ebuild   R   ] sys-devel/automake-wrapper-3-r1  

[ebuild     U ] app-misc/pax-utils-0.1.17 [0.1.16] 

[ebuild   R   ] sys-devel/gcc-config-1.4.0-r4  

[ebuild   R   ] app-misc/mime-types-7  

[ebuild   R   ] sys-devel/autoconf-wrapper-4-r3  

[ebuild   R   ] sys-apps/miscfiles-1.4.2  

[ebuild   R   ] app-admin/python-updater-0.2  

[ebuild   R   ] sys-apps/sandbox-1.2.18.1-r2  

[ebuild  N    ] dev-util/unifdef-1.20  

[ebuild     U ] sys-libs/timezone-data-2008a [2007k] 

[ebuild   R   ] dev-db/mysql-init-scripts-1.2  

[ebuild     U ] dev-libs/eventlog-0.2.7 [0.2.5] 

[ebuild   R   ] dev-libs/libmcrypt-2.5.8  

[ebuild   R   ] app-admin/php-toolkit-1.0.1  

[ebuild   R   ] sys-process/cronbase-0.3.2-r1  

[ebuild   R   ] sys-devel/patch-2.5.9  

[ebuild   R   ] app-arch/cpio-2.9-r1  

[ebuild   R   ] net-misc/dhcpcd-3.2.3  

[ebuild     U ] sys-fs/mdadm-2.6.4-r1 [2.6.4] 

[ebuild   R   ] sys-apps/hdparm-8.6  

[ebuild   R   ] sys-apps/smartmontools-5.37  

[ebuild   R   ] sys-kernel/linux-headers-2.6.23-r3  

[ebuild   R   ] dev-libs/libpcre-7.6-r1  

[ebuild     U ] dev-libs/mpfr-2.3.1 [2.2.1_p5] 

[ebuild     U ] media-libs/libpng-1.2.26-r1 [1.2.25] 

[ebuild   R   ] sys-apps/pciutils-2.2.10  

[ebuild   R   ] sys-apps/sysvinit-2.86-r10  

[ebuild     U ] net-misc/iputils-20071127 [20070202] 

[ebuild   R   ] virtual/init-0  

[ebuild   R   ] virtual/mysql-5.0  

[ebuild   R   ] virtual/perl-MIME-Base64-3.07  

[ebuild   R   ] virtual/perl-Digest-MD5-2.36  

[ebuild  N    ] virtual/emacs-22  

[ebuild   R   ] sys-process/procps-3.2.7  

[ebuild   R   ] virtual/perl-Storable-2.16  

[ebuild   R   ] virtual/perl-Scalar-List-Utils-1.19  

[ebuild   R   ] virtual/perl-digest-base-1.15  

[ebuild   R   ] net-mail/mailbase-1  

[ebuild     U ] sys-apps/man-pages-2.78 [2.76] LINGUAS="-cs% -da% -de% -es% -fr% -it% -ja% -nl% -pl% -ro% -ru% -zh_CN%" 

[ebuild   R   ] sys-devel/binutils-config-1.9-r4  

[ebuild   R   ] app-admin/eselect-emacs-1.3-r2  

[ebuild     U ] sys-fs/udev-119 [115-r1] 

[ebuild   R   ] virtual/perl-Sys-Syslog-0.18  

[ebuild   R   ] virtual/perl-libnet-1.21  

[ebuild   R   ] virtual/perl-Test-Simple-0.70  

[ebuild   R   ] virtual/perl-Time-HiRes-1.97.07  

[ebuild   R   ] virtual/perl-DB_File-1.815  

[ebuild   R   ] virtual/perl-PodParser-1.35  

[ebuild     U ] dev-lang/perl-5.8.8-r5 [5.8.8-r4] 

[ebuild   R   ] perl-core/PodParser-1.35  

[ebuild   R   ] perl-core/Storable-2.16  

[ebuild   R   ] perl-core/Scalar-List-Utils-1.19  

[ebuild   R   ] perl-core/digest-base-1.15  

[ebuild   R   ] perl-core/Sys-Syslog-0.18  

[ebuild   R   ] dev-perl/Compress-Raw-Zlib-2.005  

[ebuild   R   ] dev-perl/HTML-Tagset-3.10  

[ebuild   R   ] perl-core/Test-Simple-0.70  

[ebuild   R   ] perl-core/Time-HiRes-1.97.07  

[ebuild   R   ] perl-core/Test-Harness-2.64  

[ebuild   R   ] dev-perl/Net-Daemon-0.43  

[ebuild   R   ] dev-perl/Socket6-0.19  

[ebuild   R   ] dev-perl/Authen-SASL-2.10-r1  

[ebuild   R   ] dev-perl/URI-1.35  

[ebuild   R   ] dev-perl/Net-IP-1.25-r1  

[ebuild   R   ] dev-perl/IO-String-1.08  

[ebuild   R   ] dev-perl/HTML-Parser-3.56  

[ebuild   R   ] dev-perl/IO-Socket-INET6-2.51  

[ebuild   R   ] perl-core/libnet-1.21  

[ebuild   R   ] dev-perl/IO-Compress-Base-2.005  

[ebuild   R   ] dev-perl/Digest-SHA1-2.11  

[ebuild   R   ] dev-perl/PlRPC-0.2020-r1  

[ebuild   R   ] dev-perl/DBI-1.601  

[ebuild   R   ] dev-perl/IO-Compress-Zlib-2.005  

[ebuild   R   ] dev-perl/HTML-Tree-3.23  

[ebuild   R   ] dev-perl/Digest-HMAC-1.01-r1  

[ebuild   R   ] dev-perl/Compress-Zlib-2.005  

[ebuild   R   ] dev-perl/Net-DNS-0.63  

[ebuild   R   ] dev-perl/IO-Zlib-1.07  

[ebuild   R   ] dev-perl/Archive-Tar-1.32  

[ebuild   R   ] sys-devel/gettext-0.17  USE="emacs*" 

[ebuild  N    ] app-emacs/po-mode-0.17  

[ebuild     U ] sys-apps/sed-4.1.5-r1 [4.1.5] 

[ebuild   R   ] sys-devel/binutils-2.18-r1  

[ebuild     U ] sys-devel/m4-1.4.11 [1.4.10] 

[ebuild   R   ] sys-devel/flex-2.5.33-r3  

[ebuild   R   ] dev-libs/libgpg-error-1.6  

[ebuild     U ] sys-apps/findutils-4.3.13 [4.3.11] 

[ebuild  N    ] dev-perl/Locale-gettext-1.05  

[ebuild   R   ] sys-apps/diffutils-2.8.7-r2  

[ebuild   R   ] dev-libs/popt-1.10.7  

[ebuild   R   ] sys-apps/grep-2.5.1a-r1  

[ebuild   R   ] sys-devel/make-3.81  

[ebuild     U ] app-arch/gzip-1.3.12-r1 [1.3.12] 

[ebuild   R   ] sys-apps/net-tools-1.60-r13  

[ebuild   R   ] sys-apps/kbd-1.13-r1  

[ebuild   R   ] sys-apps/gawk-3.1.5-r5  

[ebuild     U ] app-arch/tar-1.19-r1 [1.19] 

[ebuild   R   ] sys-libs/db-4.5.20_p2  

[ebuild  N    ] sys-apps/help2man-1.36.4  USE="nls" 

[ebuild   R   ] dev-libs/pth-2.0.7-r1  

[ebuild  NS   ] sys-libs/db-4.3.29-r2  USE="-bootstrap -doc -java -nocxx -tcl -test" 

[ebuild   R   ] sys-devel/bison-2.3  

[ebuild  N    ] app-emulation/emul-linux-x86-baselibs-20080316  

[ebuild   R   ] sys-libs/gdbm-1.8.3-r3  

[ebuild   R   ] perl-core/DB_File-1.815  

[ebuild   R   ] dev-libs/libassuan-1.0.4  

[ebuild     U ] sys-devel/libperl-5.8.8-r2 [5.8.8-r1] 

[ebuild   R   ] dev-libs/openssl-0.9.8g  USE="emacs*" 

[ebuild   R   ] dev-perl/Net-SSLeay-1.30  

[ebuild     U ] net-misc/wget-1.11.1 [1.10.2] 

[ebuild   R   ] dev-perl/IO-Socket-SSL-1.12  

[ebuild  N    ] app-emacs/autoconf-mode-2.61  

[ebuild   R   ] sys-devel/autoconf-2.61-r1  USE="emacs*" 

[ebuild   R   ] sys-devel/automake-1.7.9-r1  

[ebuild     U ] sys-devel/libtool-1.5.26 [1.5.24] 

[ebuild   R   ] media-libs/jpeg-6b-r8  

[ebuild   R   ] media-libs/tiff-3.8.2-r3  

[ebuild     U ] sys-devel/automake-1.10.1 [1.10] 

[ebuild   R   ] dev-libs/apr-1.2.11  

[ebuild   R   ] dev-libs/libgcrypt-1.4.0-r1  

[ebuild   R   ] sys-apps/attr-2.4.39  

[ebuild   R   ] net-libs/liblockfile-1.06-r2  

[ebuild     U ] net-libs/libpcap-0.9.8-r1 [0.9.8] 

[ebuild   R   ] sys-apps/acl-2.2.45  

[ebuild   R   ] dev-libs/libksba-1.0.3  

[ebuild   R   ] net-analyzer/nmap-4.53  

[ebuild     U ] net-misc/rsync-2.6.9-r6 [2.6.9-r5] 

[ebuild   R   ] sys-libs/ncurses-5.6-r2  

[ebuild     U ] sys-apps/texinfo-4.11-r1 [4.8-r5] 

[ebuild     U ] app-shells/bash-3.2_p33 [3.2_p17-r1] 

[ebuild     U ] sys-apps/coreutils-6.10-r2 [6.9-r1] USE="-vanilla%" 

[ebuild   R   ] sys-libs/gpm-1.20.1-r6  

[ebuild   R   ] app-text/ispell-3.2.06-r6  

[ebuild     U ] app-editors/nano-2.0.7 [2.0.6] USE="spell*" 

[ebuild     U ] sys-apps/less-418 [416] 

[ebuild     U ] app-crypt/pinentry-0.7.5 [0.7.4-r1] 

[ebuild     U ] sys-process/psmisc-22.6 [22.5-r2] 

[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.24-r8  USE="symlink -build" 

[ebuild     U ] sys-boot/grub-0.97-r5 [0.97-r4] USE="ncurses%*" 

[ebuild     U ] sys-libs/readline-5.2_p12-r1 [5.2_p7] 

[ebuild     U ] app-editors/emacs-22.2-r2 [22.1-r4] USE="-kerberos%" 

[ebuild   R   ] app-misc/ca-certificates-20070303-r1  

[ebuild     U ] app-admin/perl-cleaner-1.05 [1.04.3] 

[ebuild   R   ] sys-apps/groff-1.19.2-r1  

[ebuild   R   ] sys-apps/ed-0.8  

[ebuild   R   ] virtual/editor-0  

[ebuild     U ] sys-apps/which-2.19 [2.16] 

[ebuild  N    ] virtual/pager-0  

[ebuild   R   ] net-misc/curl-7.17.1  

[ebuild     U ] sys-apps/man-1.6f-r1 [1.6e-r3] 

[ebuild  N    ] sys-devel/bc-1.06-r6  USE="readline -static" 

[ebuild     U ] sys-libs/com_err-1.40.8 [1.40.4] 

[ebuild     U ] sys-libs/ss-1.40.8 [1.40.4] 

[ebuild     U ] sys-fs/e2fsprogs-1.40.8 [1.40.4] 

[ebuild     U ] sys-apps/util-linux-2.13.1.1 [2.13-r2] USE="unicode%* -loop-aes% -slang%" 

[ebuild   R   ] dev-db/mysql-5.0.54  

[ebuild   R   ] dev-libs/apr-util-1.2.10  

[ebuild   R   ] dev-perl/DBD-mysql-4.00.5  

[ebuild   R   ] app-admin/apache-tools-2.2.8  

[ebuild   R   ] www-servers/apache-2.2.8  

[ebuild     U ] dev-lang/python-2.4.4-r9 [2.4.4-r6] 

[ebuild     U ] dev-libs/libxml2-2.6.31 [2.6.30-r1] USE="-examples%" 

[ebuild     U ] sys-libs/cracklib-2.8.12 [2.8.10] 

[ebuild     U ] sys-apps/file-4.23 [4.21-r1] 

[ebuild   R   ] dev-python/python-fchksum-1.7.1  

[ebuild   R   ] dev-python/pycrypto-2.0.1-r6  

[ebuild   R   ] sys-libs/pam-0.99.9.0  

[ebuild   R   ] app-admin/eselect-1.0.10  

[ebuild   R   ] media-gfx/imagemagick-6.3.8.3-r1  

[ebuild   R   ] app-admin/eselect-ctags-1.3  

[ebuild     U ] sys-apps/shadow-4.0.18.2 [4.0.18.1-r1] 

[ebuild   R   ] dev-libs/cyrus-sasl-2.1.22-r2  

[ebuild     U ] net-libs/courier-authlib-0.60.2-r1 [0.58] USE="-vpopmail%" 

[ebuild   R   ] sys-apps/busybox-1.8.2  

[ebuild     U ] net-misc/openssh-4.7_p1-r6 [4.7_p1-r1] 

[ebuild   R   ] net-mail/courier-imap-4.0.6-r2  

[ebuild   R   ] sys-apps/baselayout-1.12.11.1  

[ebuild   R   ] sys-apps/module-init-tools-3.4  

[ebuild   R   ] app-text/aspell-0.60.5  

[ebuild   R   ] app-dicts/aspell-en-6.0.0  

[ebuild   R   ] sys-devel/gcc-4.1.2  USE="-libffi%" 

[ebuild   R   ] sys-libs/glibc-2.6.1  

[ebuild   R   ] dev-util/re2c-0.12.0  

[ebuild   R   ] dev-libs/glib-2.14.6  

[ebuild   R   ] net-mail/uw-mailutils-2004g  

[ebuild   R   ] app-antivirus/clamav-0.93  

[ebuild     U ] app-admin/syslog-ng-2.0.9 [2.0.6] 

[ebuild   R   ] mail-client/pine-4.64-r5  

[ebuild   R   ] mail-mta/exim-4.69  

[ebuild     U ] app-crypt/gnupg-2.0.9 [2.0.7-r1] 

[ebuild   R   ] dev-lang/php-5.2.6_rc4  

[ebuild   R   ] sys-process/vixie-cron-4.1-r10  

[ebuild   R   ] dev-perl/Crypt-SSLeay-0.57  

[ebuild   R   ] dev-perl/libwww-perl-5.805  

[ebuild   R   ] mail-filter/spamassassin-3.2.1-r1  

[blocks B     ] sys-apps/mktemp (is blocking sys-apps/coreutils-6.10-r2)

[blocks B     ] >=sys-apps/coreutils-6.10 (is blocking sys-apps/mktemp-1.5)
```

----------

## Keruskerfuerst

You should add 

```

CPPFLAGS="-Wall"

LDFLAGS="-Wl,-O1"

```

to your /etc/make.conf.

The machine target is missing (CFLAGS).

This should speed up your system a lot.

emerge -e world updates quite a lot of packages.

----------

## SweepingOar

 *Keruskerfuerst wrote:*   

> You should add 
> 
> ```
> 
> CPPFLAGS="-Wall"
> ...

 

Ok, thanks, I'll read up on those and if nothing looks scary will give those a try.

What do you mean by this:

 *Quote:*   

> The machine target is missing (CFLAGS).

 

? I've got CFLAGS="-O2 -pipe" and I just added "-march=nacona", what is missing?

 *Quote:*   

> emerge -e world updates quite a lot of packages.

 

Thanks. I'll do that update as well.

----------

## Keruskerfuerst

# more /etc/make.conf

# These settings were set by the catalyst build script that automatically

# built this stage.

```
# Please consult /etc/make.conf.example for a more detailed example.

CFLAGS="-O2 -pipe"

CXXFLAGS="-O2 -pipe"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

# These are the USE flags that were used in addition to what is provided by the

# profile used for building.

USE="-gtk -gnome mmx sse sse2 symlink apache2 berkdb crypt curl emacs gdbm gif imagemagick jpeg

maildir multilib mysql mysqli nptl nptlonly pam pcre perl png python readline sasl session

spell spl ssl tcpd unicode xml zlib tiff"

MAKEOPTS="-j2"
```

In CLFLAGS is missing "-mtune=<your CPU> -march=<your CPU>".

and you are asking what is missing?   :Twisted Evil: 

----------

## manaka

MySQL is a threaded application. That's why you only see one process...

You can see all threads pressing "H" inside the top program. You can also try something like:

```
ps -f -L -C mysqld
```

----------

## SweepingOar

 *Keruskerfuerst wrote:*   

> In CLFLAGS is missing "-mtune=<your CPU> -march=<your CPU>".
> 
> and you are asking what is missing?  

 

Thanks. As I mentioned, I already added -march=nocona. I looked for the mtune setting for the core 2, but found this on the Gentoo wiki:  *Quote:*   

> If you aren't going to share your binaries with other computers you don't need this flag and should only set an appropriate -march instead.

 

----------

## SweepingOar

 *manaka wrote:*   

> MySQL is a threaded application. That's why you only see one process...
> 
> You can see all threads pressing "H" inside the top program. You can also try something like:
> 
> ```
> ...

 

Thanks Manaka. I was aware, I was just saying that performance has seemed to suffer since my mysqld process has been showing up as one entry in top as opposed to several the way it was several months ago (before I upgraded).

----------

## tarpman

I would suspect either your site's code or your mysql configuration over anything else. Hardware problems aren't likely to cause the performance drop you're experiencing, and the Gentoo part of your setup looks more or less sane.

I wouldn't recommend setting LDFLAGS on a production box; Keruskerfuerst's suggestions were more geared towards a bleeding-edge desktop kind of setup.

----------

## Keruskerfuerst

 *Quote:*   

> I wouldn't recommend setting LDFLAGS on a production box; Keruskerfuerst's suggestions were more geared towards a bleeding-edge desktop kind of setup.

 

LDFLAGS="-Wl,-O1" are recommend in the Gentoo Wiki and are safe.

Binaries have to be linked.

----------

## SweepingOar

 *tarpman wrote:*   

> I would suspect either your site's code or your mysql configuration over anything else. Hardware problems aren't likely to cause the performance drop you're experiencing, and the Gentoo part of your setup looks more or less sane.
> 
> 

 

I did some checking on my querys that are used in our pages and they seem ok. All the tables are MyISAM. The mysql config is the gentoo default file except that I recently added a query cache which didn't seem to make any difference.

my.cnf:

```
# /etc/mysql/my.cnf: The global mysql configuration file.

# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.1,v 1.3 2006/05/05 19:51:40 chtekk Exp $

# The following options will be passed to all MySQL clients

[client]

#password                                       = your_password

port                                            = 3306

socket                                          = /var/run/mysqld/mysqld.sock

[mysql]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqladmin]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqlcheck]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqldump]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqlimport]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqlshow]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[myisamchk]

character-sets-dir=/usr/share/mysql/charsets

[myisampack]

character-sets-dir=/usr/share/mysql/charsets

# use [safe_mysqld] with mysql-3

[mysqld_safe]

err-log                                         = /var/log/mysql/mysql.err

max_connections = 200

## SweepingOar added the next 2 lines 5/22/08

query_cache_type = 1

query_cache_size = 32M

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations

[mysqld]

character-set-server            = utf8

default-character-set           = utf8

user                                            = mysql

port                                            = 3306

socket                                          = /var/run/mysqld/mysqld.sock

pid-file                                        = /var/run/mysqld/mysqld.pid

log-error                                       = /var/log/mysql/mysqld.err

basedir                                         = /usr

datadir                                         = /var/lib/mysql

skip-locking

key_buffer                                      = 16M

max_allowed_packet                      = 1M

table_cache                             = 64

sort_buffer_size                        = 512K

net_buffer_length                       = 8K

read_buffer_size                        = 256K

read_rnd_buffer_size            = 512K

myisam_sort_buffer_size         = 8M

language                                        = /usr/share/mysql/english

# security:

# using "localhost" in connects uses sockets by default

skip-networking

bind-address                            = 127.0.0.1

log-bin

server-id                                       = 1

# point the following paths to different dedicated disks

tmpdir                                          = /tmp/

#log-update                             = /path-to-dedicated-directory/hostname

# you need the debug USE flag enabled to use the following directives,

# if needed, uncomment them, start the server and issue 

# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace

# this will show you *exactly* what's happening in your server ;)

#log                                            = /tmp/mysqld.sql

#gdb

#debug                                          = d:t:i:o,/tmp/mysqld.trace

#one-thread

# uncomment the following directives if you are using BDB tables

#bdb_cache_size                         = 4M

#bdb_max_lock                           = 10000

# the following is the InnoDB configuration

# if you wish to disable innodb instead

# uncomment just the next line

#skip-innodb

#

# the rest of the innodb config follows:

# don't eat too much memory, we're trying to be safe on 64Mb boxes

# you might want to bump this up a bit on boxes with more RAM

innodb_buffer_pool_size = 16M

# this is the default, increase it if you have lots of tables

innodb_additional_mem_pool_size = 2M

#

# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-(

# and upstream wants things to be under /var/lib/mysql/, so that's the route

# we have to take for the moment

#innodb_data_home_dir           = /var/lib/mysql/

#innodb_log_arch_dir            = /var/lib/mysql/

#innodb_log_group_home_dir      = /var/lib/mysql/

# you may wish to change this size to be more suitable for your system

# the max is there to avoid run-away growth on your machine

innodb_data_file_path = ibdata1:10M:autoextend:max:128M

# we keep this at around 25% of of innodb_buffer_pool_size

# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)

innodb_log_file_size = 5M

# this is the default, increase it if you have very large transactions going on

innodb_log_buffer_size = 8M

# this is the default and won't hurt you

# you shouldn't need to tweak it

set-variable = innodb_log_files_in_group=2

# see the innodb config docs, the other options are not always safe

innodb_flush_log_at_trx_commit = 1

innodb_lock_wait_timeout = 50

[mysqldump]

quick

max_allowed_packet                      = 16M

[mysql]

# uncomment the next directive if you are not familiar with SQL

#safe-updates

[isamchk]

key_buffer                                      = 20M

sort_buffer_size                        = 20M

read_buffer                             = 2M

write_buffer                            = 2M

[myisamchk]

key_buffer                                      = 20M

sort_buffer_size                        = 20M

read_buffer                             = 2M

write_buffer                            = 2M

[mysqlhotcopy]

interactive-timeout
```

----------

## tarpman

A thought if you updated your kernel recently: do you have CONFIG_CGROUPS yet?  If you do, try disabling it.

----------

## SweepingOar

This is all I found when searching for that flag:

```
Symbol: CGROUPS [=n]

Prompt: Control Group support

  Defined at init/Kconfig:289

  Location:

    -> General setup
```

----------

