tuning problem or bug?

tuning problem or bug?

am 26.02.2003 13:19:15 von Cedric Gavage

Hi all,

I have a question about a mysql server under Debian GNU/Linux.
debian version: woody
mysql version: 3.23.49-8.2
libc6 version: 2.2.5-11.2
kernel: 2.4.20
CPU: bi-P3-1266 (Compaq Server proliant)
Memory: 2 Go

I have often the error message "Can't create a new thread (errno 11). If
you are not out of available memory, you can consult the manual for a
possible OS-dependent bug".

Then I recompiled the libc6 package with these changes (debian use softs
with shared libraries):
in linuxthreads/internals.h:
#define STACK_SIZE (2 * 128 * 1024)

in linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h:
#define PTHREAD_THREADS_MAX 4096

in /etc/sysctl.conf:
fs/file-max=65536

in /etc/mysql/my.cnf:
[safe_mysqld]
err-log = /var/log/mysql/mysql.err
open-files-limit = 8192
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/mysql/data
tmpdir = /tmp
language = /usr/share/mysql/english
skip-locking
set-variable = key_buffer=128M
set-variable = max_allowed_packet=4M
set-variable = table_cache=512
set-variable = sort_buffer=2M
set-variable = record_buffer=2M
set-variable = thread_cache=8
set-variable = thread_stack=128K
set-variable = max_connections=500
set-variable = max_connect_errors=100
set-variable = wait_timeout=10000
# Try number of CPU's*2 for thread_concurrency
set-variable = thread_concurrency=4
set-variable = myisam_sort_buffer_size=64M

I receive the error message when I have more than 255 threads at the
same moment (mytop report).

May be the kernel to tune? (ulimit ?)

--
Cedric Gavage - Niddle
http://unixtech.be - http://gavage.com - OpenPGP: 0xED325C64



------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Re: tuning problem or bug?

am 26.02.2003 13:30:12 von Rafal Jank

>
> Then I recompiled the libc6 package with these changes (debian use softs
> with shared libraries):
> in linuxthreads/internals.h:
> #define STACK_SIZE (2 * 128 * 1024)
>
> in linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h:
> #define PTHREAD_THREADS_MAX 4096
>
> in /etc/sysctl.conf:
> fs/file-max=65536
>
> in /etc/mysql/my.cnf:
> [safe_mysqld]
> err-log = /var/log/mysql/mysql.err
> open-files-limit = 8192
> [mysqld]
> user = mysql
> pid-file = /var/run/mysqld/mysqld.pid
> socket = /var/run/mysqld/mysqld.sock
> port = 3306
> basedir = /usr
> datadir = /var/mysql/data
> tmpdir = /tmp
> language = /usr/share/mysql/english
> skip-locking
> set-variable = key_buffer=128M
> set-variable = max_allowed_packet=4M
> set-variable = table_cache=512
> set-variable = sort_buffer=2M
> set-variable = record_buffer=2M
> set-variable = thread_cache=8
> set-variable = thread_stack=128K
> set-variable = max_connections=500
> set-variable = max_connect_errors=100
> set-variable = wait_timeout=10000
> # Try number of CPU's*2 for thread_concurrency
> set-variable = thread_concurrency=4
> set-variable = myisam_sort_buffer_size=64M
>
> I receive the error message when I have more than 255 threads at the
> same moment (mytop report).
>
> May be the kernel to tune? (ulimit ?)
>
Check what ulimit -a returns (especially max user processes parameter).

> --
> Cedric Gavage - Niddle
> http://unixtech.be - http://gavage.com - OpenPGP: 0xED325C64
>
>
>
> ------------------------------------------------------------ ---------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail
> To unsubscribe, e-mail
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


--
_/ _/ _/_/_/ ----- Rafa³ Jank rjank@wp-sa.pl -----
_/ _/ _/ _/ _/ Wirtualna Polska SA http://www.wp.pl
_/_/_/_/ _/_/_/ ul. Traugutta 115c, 80-237 Gdansk, tel/fax. (58)5215625
_/ _/ _/ --------==* http://szukaj.wp.pl *==----------

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php