Hey,
I need some help with optimization of Apache & mySQL as sometimes my server load gets upto 1.30+.
Average it remains 0.40+...
I have already optimized my.cnf file by replacing the default my.cnf with the my-huge.cnf file. I had to optimize mySQL because a site that has a mysql db of over 650 mb caused the average load to be 1.30+..
:: MY SERVER SPECS ::
Intel P4 2.4 Ghz
1 GB ECC DDRAM
----------- MY . CNF FILE --------------------
port = 3306
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Replication Master Server (default)
# binary logging is required for replication
log-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
-------------------- END MY . CNF FILE -----------
And From HTTPD.CONF :::
TimeOut 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 10
MinSpareServers 32
MaxSpareServers 64
StartServers 5
MaxClients 256
MaxRequestsPerChild 0
Sugesstions? Please do let me know..
BTW, I have also installed PHPAccelerator and Mod_Gzip and the site loads fast now, but the server load is still the same.
I need some help with optimization of Apache & mySQL as sometimes my server load gets upto 1.30+.
Average it remains 0.40+...
I have already optimized my.cnf file by replacing the default my.cnf with the my-huge.cnf file. I had to optimize mySQL because a site that has a mysql db of over 650 mb caused the average load to be 1.30+..
:: MY SERVER SPECS ::
Intel P4 2.4 Ghz
1 GB ECC DDRAM
----------- MY . CNF FILE --------------------
port = 3306
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Replication Master Server (default)
# binary logging is required for replication
log-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
-------------------- END MY . CNF FILE -----------
And From HTTPD.CONF :::
TimeOut 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 10
MinSpareServers 32
MaxSpareServers 64
StartServers 5
MaxClients 256
MaxRequestsPerChild 0
Sugesstions? Please do let me know..
BTW, I have also installed PHPAccelerator and Mod_Gzip and the site loads fast now, but the server load is still the same.
Last edited: