Tengo un verdadero problema con mi VPS puesto que llevo unos cuantos meses con un sobreuso del servidor que no cuadra para nada con mis estadísticas (la web no supera las 3000 visitas diarias)...
Especificaciones de mi VPS:
Cita:
Segun Virtuozzo tengo un uso del 60% del servidor cuando (que sube considerablemente cuando aumenta el trafico) y lo que más me preocupa es que tengo continuamente alertas QoS de privvmpages (zona amarilla)...512 MB Guaranteed RAM (1024 Max)
Guaranteed CPU 2.0 GhZ
800 GB Bandwith
Guaranteed CPU 2.0 GhZ
800 GB Bandwith
Os copio datos que he recuperado...
Mysql report:
Cita:
Otro análisis:Uptime = 7 days 12 hrs 8 min 9 sec
Avg. qps = 16
Total Questions = 10964329
Threads Connected = 1
Server has been running for over 48hrs.
It should be safe to follow 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 NOT enabled.
Current long_query_time = 10 sec.
You have 14 out of 10964350 that take longer than 10 sec. to complete
Your long_query_time may be too high, I typically set this under 5 sec.
BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.0/...-recovery.html
WORKER THREADS
Current thread_cache_size = 128
Current threads_cached = 65
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 500
Current threads_connected = 1
Historic max_used_connections = 66
The number of used connections is 13% of the configured maximum.
Your max_connections variable seems to be fine.
MEMORY USAGE
Max Memory Ever Allocated : 640 M
Configured Max Per-thread Buffers : 2 G
Configured Max Global Buffers : 282 M
Configured Max Memory Limit : 2 G
Physical Memory : 900.00 M
Max memory limit exceeds 90% of physical memory
KEY BUFFER
Current MyISAM index space = 146 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 927
Key buffer fill ratio = 100.00 %
You could increase key_buffer_size
It is safe to raise this up to 1/4 of total system memory;
assuming this is a dedicated database server.
QUERY CACHE
Query cache is enabled
Current query_cache_size = 256 M
Current query_cache_used = 93 M
Current query_cache_limit = 8 M
Current Query cache Memory fill ratio = 36.47 %
Current query_cache_min_res_unit = 4 K
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 1.00 M
You have had 4109 queries where a join could not use an index properly
You have had 1 joins without keys that check for key usage after each row
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 = 2558 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
You currently have open more than 75% of your open_files_limit
You should set a higher value for open_files_limit in my.cnf
TABLE CACHE
Current table_cache value = 1024 tables
You have a total of 946 tables
You have 1024 open tables.
Current table_cache hit rate is 33%, while 100% of your table cache is in use
You should probably increase your table_cache
TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 336451 temp tables, 12% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 2 M
Current table scan ratio = 75 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 1 : 770
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.
Avg. qps = 16
Total Questions = 10964329
Threads Connected = 1
Server has been running for over 48hrs.
It should be safe to follow 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 NOT enabled.
Current long_query_time = 10 sec.
You have 14 out of 10964350 that take longer than 10 sec. to complete
Your long_query_time may be too high, I typically set this under 5 sec.
BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.0/...-recovery.html
WORKER THREADS
Current thread_cache_size = 128
Current threads_cached = 65
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 500
Current threads_connected = 1
Historic max_used_connections = 66
The number of used connections is 13% of the configured maximum.
Your max_connections variable seems to be fine.
MEMORY USAGE
Max Memory Ever Allocated : 640 M
Configured Max Per-thread Buffers : 2 G
Configured Max Global Buffers : 282 M
Configured Max Memory Limit : 2 G
Physical Memory : 900.00 M
Max memory limit exceeds 90% of physical memory
KEY BUFFER
Current MyISAM index space = 146 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 927
Key buffer fill ratio = 100.00 %
You could increase key_buffer_size
It is safe to raise this up to 1/4 of total system memory;
assuming this is a dedicated database server.
QUERY CACHE
Query cache is enabled
Current query_cache_size = 256 M
Current query_cache_used = 93 M
Current query_cache_limit = 8 M
Current Query cache Memory fill ratio = 36.47 %
Current query_cache_min_res_unit = 4 K
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 1.00 M
You have had 4109 queries where a join could not use an index properly
You have had 1 joins without keys that check for key usage after each row
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 = 2558 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
You currently have open more than 75% of your open_files_limit
You should set a higher value for open_files_limit in my.cnf
TABLE CACHE
Current table_cache value = 1024 tables
You have a total of 946 tables
You have 1024 open tables.
Current table_cache hit rate is 33%, while 100% of your table cache is in use
You should probably increase your table_cache
TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 336451 temp tables, 12% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 2 M
Current table scan ratio = 75 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 1 : 770
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.
Cita:
MySQL 5.0.67-community uptime 7 12:9:40 Wed Dec 31 01:58:20 2008
__ Key __________________________________________________ _______________
Buffer used 14.16M of 16.00M %Used: 88.48
Current 16.00M %Usage: 100.00
Write hit 51.00%
Read hit 99.89%
__ Questions __________________________________________________ _________
Total 10.97M 16.9/s
QC Hits 6.88M 10.6/s %Total: 62.78
DMS 3.01M 4.6/s 27.45
Com_ 667.04k 1.0/s 6.08
COM_QUIT 374.91k 0.6/s 3.42
+Unknown 29.16k 0.0/s 0.27
Slow 10 s 14 0.0/s 0.00 %DMS: 0.00 Log: OFF
DMS 3.01M 4.6/s 27.45
SELECT 1.89M 2.9/s 17.21 62.69
UPDATE 664.53k 1.0/s 6.06 22.08
INSERT 206.02k 0.3/s 1.88 6.84
DELETE 197.83k 0.3/s 1.80 6.57
REPLACE 54.65k 0.1/s 0.50 1.82
Com_ 667.04k 1.0/s 6.08
change_db 507.65k 0.8/s 4.63
set_option 154.02k 0.2/s 1.40
show_proces 2.17k 0.0/s 0.02
__ SELECT and Sort __________________________________________________ ___
Scan 733.35k 1.1/s %SELECT: 38.87
Range 64.09k 0.1/s 3.40
Full join 4.11k 0.0/s 0.22
Range check 1 0.0/s 0.00
Full rng join 28 0.0/s 0.00
Sort scan 446.70k 0.7/s
Sort range 262.06k 0.4/s
Sort mrg pass 519 0.0/s
__ Query Cache __________________________________________________ _______
Memory usage 93.43M of 256.00M %Used: 36.50
Block Fragmnt 5.30%
Hits 6.88M 10.6/s
Inserts 1.75M 2.7/s
Insrtrune 1.75M:1 2.7/s
Hit:Insert 3.93:1
__ Table Locks __________________________________________________ _______
Waited 6.50k 0.0/s %Total: 0.13
Immediate 5.01M 7.7/s
__ Tables __________________________________________________ ____________
Open 1024 of 1024 %Cache: 100.00
Opened 3.07k 0.0/s
__ Connections __________________________________________________ _______
Max used 66 of 500 %Max: 13.20
Total 375.57k 0.6/s
__ Created Temp __________________________________________________ ______
Disk table 43.15k 0.1/s
Table 336.48k 0.5/s Size: 32.0M
File 1.04k 0.0/s
__ Threads __________________________________________________ ___________
Running 1 of 1
Cached 65 of 128 %Hit: 99.98
Created 66 0.0/s
Slow 0 0/s
__ Aborted __________________________________________________ ___________
Clients 1.32k 0.0/s
Connects 75 0.0/s
__ Bytes __________________________________________________ _____________
Sent 914.84M 1.4k/s
Received 1.43G 2.2k/s
__ Key __________________________________________________ _______________
Buffer used 14.16M of 16.00M %Used: 88.48
Current 16.00M %Usage: 100.00
Write hit 51.00%
Read hit 99.89%
__ Questions __________________________________________________ _________
Total 10.97M 16.9/s
QC Hits 6.88M 10.6/s %Total: 62.78
DMS 3.01M 4.6/s 27.45
Com_ 667.04k 1.0/s 6.08
COM_QUIT 374.91k 0.6/s 3.42
+Unknown 29.16k 0.0/s 0.27
Slow 10 s 14 0.0/s 0.00 %DMS: 0.00 Log: OFF
DMS 3.01M 4.6/s 27.45
SELECT 1.89M 2.9/s 17.21 62.69
UPDATE 664.53k 1.0/s 6.06 22.08
INSERT 206.02k 0.3/s 1.88 6.84
DELETE 197.83k 0.3/s 1.80 6.57
REPLACE 54.65k 0.1/s 0.50 1.82
Com_ 667.04k 1.0/s 6.08
change_db 507.65k 0.8/s 4.63
set_option 154.02k 0.2/s 1.40
show_proces 2.17k 0.0/s 0.02
__ SELECT and Sort __________________________________________________ ___
Scan 733.35k 1.1/s %SELECT: 38.87
Range 64.09k 0.1/s 3.40
Full join 4.11k 0.0/s 0.22
Range check 1 0.0/s 0.00
Full rng join 28 0.0/s 0.00
Sort scan 446.70k 0.7/s
Sort range 262.06k 0.4/s
Sort mrg pass 519 0.0/s
__ Query Cache __________________________________________________ _______
Memory usage 93.43M of 256.00M %Used: 36.50
Block Fragmnt 5.30%
Hits 6.88M 10.6/s
Inserts 1.75M 2.7/s
Insrtrune 1.75M:1 2.7/s
Hit:Insert 3.93:1
__ Table Locks __________________________________________________ _______
Waited 6.50k 0.0/s %Total: 0.13
Immediate 5.01M 7.7/s
__ Tables __________________________________________________ ____________
Open 1024 of 1024 %Cache: 100.00
Opened 3.07k 0.0/s
__ Connections __________________________________________________ _______
Max used 66 of 500 %Max: 13.20
Total 375.57k 0.6/s
__ Created Temp __________________________________________________ ______
Disk table 43.15k 0.1/s
Table 336.48k 0.5/s Size: 32.0M
File 1.04k 0.0/s
__ Threads __________________________________________________ ___________
Running 1 of 1
Cached 65 of 128 %Hit: 99.98
Created 66 0.0/s
Slow 0 0/s
__ Aborted __________________________________________________ ___________
Clients 1.32k 0.0/s
Connects 75 0.0/s
__ Bytes __________________________________________________ _____________
Sent 914.84M 1.4k/s
Received 1.43G 2.2k/s