yavuz
Well-known member
For several days, I'm trying to tune my server setting, my.conf and other stuff and I thought I ask for your suggestions.
Server Specs:
Intel(R) Core(TM) i7 CPU VPS with two cores avaliable (total 5000 Ghz)
4 GB RAM
cPanel as control panel
MySQL 5.1.56, php 5.3.10
Zend Engine v2.3.0, eAccelerator v0.9.6.1, ionCube PHP Loader v4.0.9, Suhosin v0.9.32.1
APC
my.conf is currently set to default:
php.ini
This is the output I get with mysqltuner:
This is what I put in my library/config.php
I assume this is the correct for frontent and backend caching?
Server load is usually ok but loading website pages become a pain. What would you suggest I set me my.conf and php.ini?
Thanks.
Server Specs:
Intel(R) Core(TM) i7 CPU VPS with two cores avaliable (total 5000 Ghz)
4 GB RAM
cPanel as control panel
MySQL 5.1.56, php 5.3.10
Zend Engine v2.3.0, eAccelerator v0.9.6.1, ionCube PHP Loader v4.0.9, Suhosin v0.9.32.1
APC
my.conf is currently set to default:
Code:
[mysqld]
set-variable = max_connections=500
log-slow-queries
safe-show-database
wait_timeout = 28800
max_allowed_packet = 16777216
php.ini
Code:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
extension = "eaccelerator.so"
extension = "suhosin.so"
extension = "pdo.so"
extension = "pdo_sqlite.so"
extension = "sqlite.so"
extension = "pdo_mysql.so"
extension = "apc.so"
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 128M
This is the output I get with mysqltuner:
Code:
-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 5h 5m 25s (5M q [52.293 qps], 354K conn, TX: 176B, RX: 1B)
[--] Reads / Writes: 82% / 18%
[--] Total buffers: 34.0M global + 2.7M per thread (500 max threads)
[OK] Maximum possible memory usage: 1.4G (34% of installed RAM)
[OK] Slow queries: 0% (101/5M)
[OK] Highest usage of available connections: 5% (25/500)
[OK] Key buffer size / total MyISAM indexes: 8.0M/254.0M
[OK] Key buffer hit rate: 96.1% (72M cached / 2M reads)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 520K sorts)
[!!] Joins performed without indexes: 47179
[!!] Temporary tables created on disk: 46% (84K on disk / 182K total)
[!!] Thread cache is disabled
[!!] Table cache hit rate: 0% (64 open / 1M opened)
[OK] Open file limit used: 1% (42/2K)
[OK] Table locks acquired immediately: 99% (6M immediate / 6M locks)
[!!] InnoDB data size / buffer pool: 693.9M/8.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Adjust your join queries to always utilize indexes
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries without LIMIT clauses
Set thread_cache_size to 4 as a starting value
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
query_cache_size (>= 8M)
join_buffer_size (> 128.0K, or always use indexes with joins)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
thread_cache_size (start at 4)
table_cache (> 64)
innodb_buffer_pool_size (>= 693M)
This is what I put in my library/config.php
Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backend'] = 'Apc';
I assume this is the correct for frontent and backend caching?
Server load is usually ok but loading website pages become a pain. What would you suggest I set me my.conf and php.ini?
Thanks.