Server load and MYSQL

Jason Crowe jcrowe at cmuonline.net
Tue Oct 22 10:35:10 CDT 2002


You should install mytop. It is basicly top for MySQL. Once you get this 
installed look at your key efficience it should be near %99. It wall 
also show you how many slow queries you are running. This should help 
you out a little. It also sounds like you need more ram.

Jason

Aaron wrote:

>>Do you have adequate indexes on your MySQL tables? You're getting much
>>heavier traffic than I have ever had to deal with and the number of
>>variables at play here is large, but if it's MySQL that's eating your
>>resources, try to find some good information on tuning MySQL.
>>    
>>
>
>Not sure.  MySQL is not my strong point at all.  I spent 4 hours the other
>night trying to figure out where my sock file went and why I couldn't create
>a new one. (permissions problems)
>
>  
>
>>You said this box has 1GB of RAM, how much of it is being used at any
>>given time, on average, max?
>>    
>>
>
>Average, most of the time is about 995MB..  Max I see about 16-25MB of swap
>being used.
>
>  
>
>>Depending on that information, I'd consider increasing the key_buffer_size
>>parameter for MySQL. This will increase the "cache hits" thus preventing
>>the box from going to disk as much, which should speed things up a bit.
>>
>>Also increasing the table_cache parameter will cause more table data to be
>>kept resident in RAM, thus decreasing disk IO.
>>
>>Other things to consider mucking with are record_buffer and sort_buffer,
>>but be careful with increasing these too much if you have a large number
>>of session connections.
>>
>>I would try adjusting the key_buffer_size and table_cache first and see
>>what happens.
>>    
>>
>
>Okay, Again, not my strong suit.  Here's the my.cnf file. Anyone see
>anything wierd that should be changed?
>
>[client]
>port = 3306
>socket = /var/lib/mysql/mysql.sock
>
>[mysqld]
>port = 3306
>socket = /var/lib/mysql/mysql.sock
>skip-locking
>set-variable = max_connections=650
>set-variable = key_buffer=16M
>set-variable = myisam_sort_buffer_size=64M
>set-variable = join_buffer=1M
>set-variable = record_buffer=1M
>set-variable = sort_buffer=2M
>set-variable = table_cache=1024
>set-variable = thread_cache_size=256
>set-variable = wait_timeout=9600
>set-variable = connect_timeout=10
>set-variable = max_allowed_packet=16M
>set-variable = max_connect_errors=10
>
>[safe_mysqld]
>open_files_limit=8192
>
>[mysqldump]
>quick
>set-variable = max_allowed_packet=16M
>
>[myisamchk]
>set-variable = key_buffer=64M
>set-variable = sort_buffer=64M
>set-variable = read_buffer=16M
>set-variable = write_buffer=16M
>
>
>
>
>
>
>  
>




More information about the Kclug mailing list