Make sense,

Kayra,  this is my.cnf for my mysql
----------------cut here -------------------
[client]
port            = 3306
socket          = /var/lib/mysql/mysql.sock


# The MySQL server
[mysqld]
#thread_stack=128KB
#set-variable = table-type=innodb
default-table-type = innodb
port               = 3306
socket             = /var/lib/mysql/mysql.sock
max_connections    = 910
max_connect_errors = 9999999
skip-locking
skip-innodb_doublewrite
key_buffer         = 384M
max_allowed_packet = 4M
table_cache        = 2049
sort_buffer_size   = 12M
read_buffer_size   = 12M
myisam_sort_buffer_size = 64M
thread_cache       = 48
query_cache_size   = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

# Master Replication
# ------------------
#log-bin
#server-id=1

# My Inno DB tables
# -----------------
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir =
innodb_data_file_path = /data1/ibdata1:2000M;/data1/ibdata2:2000M;/data1/ibdata3:2000M;/data1/ibdata4:2000M;/data2/ibdata5:2000M;/data2/ibdata6:2000M;/data2/ibdata7:2000M;/data2/ibdata8:2000M;/data3/ibdata9:2000M;/data3/ibdata10:2000M;/data3/ibdata11:2000M;/data3/ibdata12:2000M;/data4/ibdata13:2000M;/data4/ibdata14:2000M;/data4/ibdata15:2000M;/data4/ibdata16:2000M;/data5/ibdata17:2000M;/data5/ibdata18:2000M;/data5/ibdata19:2000M;/data5/ibdata20:2000M;

# ------ OLD ---
innodb_log_group_home_dir = /data1
innodb_log_arch_dir = /data1
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 1300M
innodb_additional_mem_pool_size = 80M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 100M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 20
innodb_table_locks=0
transaction-isolation = REPEATABLE-READ
----------------cut here -------------------

File open limit:
# cat /proc/sys/fs/file-max
512000

Kernel usage:
# uname -a
Linux db 2.4.20-8bigmem #1 SMP Thu Mar 13 17:32:29 EST 2003 i686 i686 i386 GNU/Linux

Redhat Release :
# cat /etc/redhat-release
Red Hat Linux release 9 (Shrike)

However the bad news is when i try c program (http://forums.mysql.com/read.php?21,71414,71667#msg-71667)

#include <stdio.h>
#include <stdlib.h>

int main ( void )
{
size_t siz = 100 * 1024 * 1024 ;
size_t idx = 1 ;
void *ptr ;

for (;;)
{
ptr = malloc ( siz * idx );
if ( ! ptr )
break ;
free ( ptr );
idx ++ ;
}
printf ( "Max malloc %d * 100 MB \n", idx - 1 );
return ( 0 );
}

It return only 20*100Mbyte for MySQL user ~ 2 Gbytes

Please give me clue on this issue

Thx



Kayra Otaner wrote:

It can be both Linux kernel setting and MySQL configuration issue.

It can be a kernel issue since:
- Although you have 4G on your machine your kernel may set to let only
2G to a user space process. You may need to upgrade your kernel to a
'hugemem' kernel which gives you either 3/1 or 4/4 (you need 8G mem for
this) memory split
- Number of open files (directly co related to number of open tables in
MySQL) setting in kernel can be lower than what your MySQL instance
needs.

It can be a MySQL configuration issue since :
- You may have incorrect settings in your my.cnf config file. Say if you
assigned 2G to innodb buffer and other buffers and your kernel lets you
to go upto 2G for user space process. For each connection coming MySQL
dedicates at least 128K (thread size) memory, so for 350 connection, you
end up using +43M memory which makes MySQL's total mem usage 2G + 43M.
This may be the reason why you're seeing can't create new thread.


Kayra Otaner

On Fri, 2006-02-24 at 20:51 +0700, Ady Wicaksono wrote:
I have MySQL 5 installed on My Machine,

But it could handle only max about 350 concurrent mysql connection

Unbelieveable, i have 4 Gbytes, but on the next 351 connection i always
got Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for
a possible OS-dependent bug in

Is it mysql bug, incorrect Linux setting or what?












--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to