| Max Concurrent Connections [message #3386] |
Sat, 09 August 2008 03:32  |
shyamala Messages: 2 Registered: August 2008 Location: Chennai |
Junior Member |
|
|
We have a database Server Configuration:
4GB RAM
600GB Hard Disk
Xeon Processor 1.3 Ghz.
We are barely able to have 100 concurrent users!!! What are we doing wrong.
I know I need to configure mysql_query cache, mysql_limit_size and table_cache. But what should be the formula, and how do we go about checking the same.
Below is the details of our my.ini file.
[mysqld]
datadir=/database/data
socket=/var/lib/mysql/mysql.sock
set-variable=max_connections=2000
set-variable = max_allowed_packet=64M
default-storage-engine = innodb
log-bin=/database/data/mysql-bin
#skip-networking
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
|
|
|
| Re: Max Concurrent Connections [message #3390 is a reply to message #3386 ] |
Sat, 09 August 2008 10:06   |
Speeple Messages: 91 Registered: August 2006 |
Member |
|
|
Most important are the data buffers.
I'll assume you're using MyISAM so try this to get the size of cache for MyISAM indexes:
SHOW VARIABLES LIKE 'key_buffer_size'
That's the size in bytes.
Then you can guess the optimum value (making sure it's with limits of your available RAM) by doing:
SHOW TABLE STATUS WHERE Engine='MyISAM';
The sum of all the "Index_length" columns would be your optimum key_buffer size (plus a few megs).
Martin Gallagher | Speeple: The latest news
|
|
|
|
| Re: Max Concurrent Connections [message #3397 is a reply to message #3386 ] |
Sun, 10 August 2008 05:37   |
Speeple Messages: 91 Registered: August 2006 |
Member |
|
|
I still have no idea how large your MyISAM indexes are, so I can't make an absolutely accurate value for your settings. But these might help:
MyISAM key buffer:
key_buffer = 512M // I'm just guessing your indexes are <= 512 Mb in size
(You list two key_buffer's, one being an alias in you config, remove one).
I have no idea what size you tmp tables are when created, nor do I know if they contain syntax that forces them to be written on disk, but to possibly reduce tmp tables being written to disk you could try:
tmp_table_size = 128M
max_heap_table_size = 128M
Martin Gallagher | Speeple: The latest news
|
|
|
| Re: Max Concurrent Connections [message #3514 is a reply to message #3386 ] |
Wed, 10 September 2008 20:05  |
johnphilips Messages: 1 Registered: September 2008 |
Junior Member |
|
|
Hi shyamala,
I agree with Speeple, and I am not the SQL expert, but may be I think you will get the right solution on the SQL forum. Just search on the internet "sql forum".
John Philips
Foreclosed Homes
|
|
|