Millar

Active Member
Dec 23, 2006
29
0
151
My serer useage is always in the black zone. Meaning sometimes cpanel and WHM won't load because there is not enough memory left.

This is what is in the black zone:
ID Current Use Soft Limit Hard Limit Units Description
privvmpages 97,891 98,304 104,448 4KB pages Memory allocation limit

When I shut down my MySQL server, it is fine but it seems MySQL server is eating loads of memory. Is this normal or is there a way to lower the amount of memory used?
 

Millar

Active Member
Dec 23, 2006
29
0
151
you need to tune your mysql server /etc/my.cnf

there are plenty of how too's on the form
It's kind of bear at the moment, this is it:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# 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
I think maybe none of that can be configured to save mem?

Could anyone like post a more detailed one so that I can make modifications?
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
157
368
SLC
cPanel Access Level
DataCenter Provider
here is one I use for a 512MB sever edit to suit your needs as every server is different depending your usage


[mysqld]
max_connections = 500
key_buffer = 150M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 1M
table_cache = 1500
thread_cache_size = 128
wait_timeout = 14400
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
skip-innodb

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M