- Linux ns307646.ovh.net 2.6.32.2-xxxx-grs-ipv4-64 #1 SMP Tue Dec 29 14:41:12 UTC 2009 x86_64 Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz GenuineIntel GNU/Linux
- MySQL Version 5.0.44-log x86_64
- PHP Version 5.2.5-pl1-gentoo
#mysqladmin status
Uptime: 922 Threads: 6 Questions: 180988 Slow queries: 96 Opens: 169 Flush tables: 1 Open tables: 159 Queries per second avg: 196.299
Apache status
Current Time: Thursday, 08-Jul-2010 10:49:03 CEST
Restart Time: Thursday, 08-Jul-2010 03:11:23 CEST
Parent Server Generation: 6
Server uptime: 7 hours 37 minutes 40 seconds
Total accesses: 122113 - Total Traffic: 176.5 GB
CPU Usage: u11.87 s.45 cu87.76 cs0 - .364% CPU load
4.45 requests/sec - 6.6 MB/second - 1.5 MB/request
41 requests currently being processed, 22 idle workers
CC_KCWWCKK__W__K..CWCK__K____._KKWKKK__CWWKWWKWC_KKWC_CK_KWWW___
__..................................
#top
top - 10:51:19 up 1 day, 13:39, 1 user, load average: 11.31, 5.22, 3.53
Tasks: 244 total, 2 running, 239 sleeping, 0 stopped, 3 zombie
Cpu0 : 82.8% us, 13.3% sy, 0.0% ni, 3.6% id, 0.0% wa, 0.0% hi, 0.3% si
Cpu1 : 85.2% us, 9.2% sy, 0.0% ni, 3.0% id, 2.6% wa, 0.0% hi, 0.0% si
Cpu2 : 83.6% us, 9.2% sy, 0.0% ni, 2.6% id, 0.7% wa, 0.0% hi, 3.9% si
Cpu3 : 81.8% us, 8.3% sy, 0.0% ni, 2.6% id, 7.3% wa, 0.0% hi, 0.0% si
Mem: 8183796k total, 6795712k used, 1388084k free, 472764k buffers
Swap: 1047728k total, 95476k used, 952252k free, 4476520k cached
#free -m
total used free shared buffers cached
Mem: 7991 5970 2021 0 626 3809
-/+ buffers/cache: 1534 6457
Swap: 1023 80 942
./mysqltuner.sh
(pas encore très utile vu le uptime)
>> MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at
http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.44-log
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated -InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 3G (Tables: 342)
[--] Data in MEMORY tables: 1008K (Tables: 14)
[!!] Total fragmented tables: 43
-------- Performance Metrics -------------------------------------------------
[--] Up for: 38m 22s (418K q [181.853 qps], 8K conn, TX: 243M, RX: 66M)
[--] Reads / Writes: 83% / 17%
[--] Total buffers: 2.2G global + 4.2M per thread (100 max threads)
[OK] Maximum possible memory usage: 2.6G (33% of installed RAM)
[OK] Slow queries: 0% (254/418K)
[OK] Highest usage of available connections: 56% (57/100)
[OK] Key buffer size / total MyISAM indexes: 2.0G/2.0G
[OK] Key buffer hit rate: 100.0% (1B cached / 522K reads)
[OK] Query cache efficiency: 77.4% (166K cached / 215K selects)
[OK] Query cache prunes per day: 0
[!!] Sorts requiring temporary tables: 13% (2K temp sorts / 17K sorts)
[!!] Joins performed without indexes: 75
[OK] Temporary tables created on disk: 11% (4K on disk / 36K total)
[OK] Thread cache hit rate: 99% (57 created / 8K connections)
[OK] Table cache hit rate: 97% (491 open / 505 opened)
[OK] Open file limit used: 31% (839/2K)
[OK] Table locks acquired immediately: 99% (92K immediate / 93K locks)
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Adjust your join queries to always utilize indexes
Variables to adjust:
sort_buffer_size (> 1023K)
read_rnd_buffer_size (> 508K)
join_buffer_size (> 2.0M, or always use indexes with joins)
tuning-primer.sh ?
(pas encore très utile vu le uptime)
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -
MySQL Version 5.0.44-log x86_64
Uptime = 0 days 0 hrs 19 min 28 sec
Avg. qps = 202
Total Questions = 236813
Threads Connected = 8
Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations
To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.0/...variables.html
Visit
http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service
SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 2 sec.
You have 129 out of 236846 that take longer than 2 sec. to complete
Your long_query_time seems to be fine
BINARY UPDATE LOG
The binary update log is enabled
Binlog sync is not enabled, you could loose binlog records during a server crash
WORKER THREADS
Current thread_cache_size = 64
Current threads_cached = 22
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 100
Current threads_connected = 5
Historic max_used_connections = 25
The number of used connections is 25% of the configured maximum.
Your max_connections variable seems to be fine.
MEMORY USAGE
Max Memory Ever Allocated : 2.23 G
Configured Max Per-thread Buffers : 426 M
Configured Max Global Buffers : 2.13 G
Configured Max Memory Limit : 2.55 G
Physical Memory : 7.80 G
Max memory limit seem to be within acceptable norms
KEY BUFFER
Current MyISAM index space = 1.97 G
Current key_buffer_size = 2.00 G
Key cache miss rate is 1 : 1529
Key buffer free ratio = 71 %
Your key_buffer_size seems to be fine
QUERY CACHE
Query cache is enabled
Current query_cache_size = 128 M
Current query_cache_used = 19 M
Current query_cache_limit = 2 M
Current Query cache Memory fill ratio = 15.28 %
Current query_cache_min_res_unit = 2 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
Current sort_buffer_size = 1 M
Current read_rnd_buffer_size = 508 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 2.00 M
You have had 34 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.
Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.
OPEN FILES LIMIT
Current open_files_limit = 2670 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine
TABLE CACHE
Current table_cache value = 1280 tables
You have a total of 373 tables
You have 448 open tables.
The table_cache value seems to be fine
TEMP TABLES
Current max_heap_table_size = 64 M
Current tmp_table_size = 64 M
Of 20319 temp tables, 11% were created on disk
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 508 K
Current table scan ratio = 5145 : 1
You have a high ratio of sequential access requests to SELECTs
You may benefit from raising read_buffer_size and/or improving your use of indexes.
TABLE LOCKING
Current Lock Wait ratio = 1 : 130
You may benefit from selective use of InnoDB.
Configuration httpd.conf
Timeout 20
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 10
<IfModule prefork.c>
MaxClients 200
ServerLimit 100
StartServers 4
MinSpareServers 1
MaxSpareServers 8
MaxRequestsPerChild 1000
</IfModule>
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
DOSEmailNotify "xxx@gmail.com"
DOSWhiteList 127.0.0.1
DOSWhitelist 66.249.65.*
DOSWhitelist 66.249.66.*
DOSWhitelist 66.249.67.*
DOSLogDir "/var/log/evasive/"
#DOSSystemCommand "sudo -u nobody /sbin/iptables -I INPUT -s %s -j DROP"
DOSSystemCommand "/bin/echo %s >> /var/log/evasive/dos_evasive.log && /bin/date >> /var/log/evasive/dos_evasive.log"
</IfModule>
Module Cband, activé pour chaque site hébergé
CBandRemoteSpeed 2048 32 6
MRTG
http://ns307646.ovh.net/cgi-bin/mrtg.cgi/
Configuration my.cnf
skip-locking
skip-networking
skip-bdb
skip-innodb
character-set-server = utf8
default-character-set = utf8
user = mysql
port = 3306
basedir = /usr
datadir = /var/lib/mysql
socket = /var/run/mysqld/mysqld.sock
pid-file = /var/run/mysqld/mysqld.pid
language = /usr/share/mysql/english
max_connections = 100
interactive_timeout = 25
wait_timeout = 10
connect_timeout = 5
max_connect_errors = 10
max_allowed_packet = 16M
table_cache = 1280
open_files_limit = 2560
max_heap_table_size = 64M
tmp_table_size = 64M
key_buffer = 2048M
join_buffer_size = 2M
#record_buffer = 8M
sort_buffer_size = 1M
read_rnd_buffer_size = 512K
read_buffer_size = 512K
myisam_sort_buffer_size = 4M
thread_cache_size = 64
query_cache_size = 128M
query_cache_limit = 2M
query_cache_min_res_unit = 2Ko
thread_concurrency = 8
low_priority_updates = 1
concurrent_insert = 2
max_write_lock_count = 1
ft_min_word_len = 3
ft_max_word_len = 64
expire_logs_days = 7
long_query_time = 2
log-error = /var/log/mysql/mysqld.err
log-slow-queries = /var/log/mysql/slow-query.log
log_warnings
#log_queries_not_using_indexes
Configuration php.ini
max_execution_time = 20
max_input_time = 30
memory_limit = 8M
Partager