Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

is there a such thing as too much cache? i have a 2GB ram server.

i run 2-3 sites off the following:

[mysqld]
set-variable = max_connections=50
log-slow-queries
safe-show-database
skip-networking
skip-name-resolve
set-variable=local-infile=0
local-infile=0
query_cache_type=1
query_cache_limit=1M
query_cache_size=32M
table_cache=1024
table_definition_cache=512
max_heap_table_size=512
tmp_table_size=32M
max_heap_table_size=32M
thread_cache=32
key_buffer=64M
read_buffer_size=1M
sort_buffer_size=1M
myisam_sort_buffer_size=64M
thread_concurrency=4
interactive_timeout=100
wait_timeout=15
connect_timeout=10
long_query_time=1
flush_time=3600

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

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

.

+----------------+----------------------+----------------------+----------------------+
| Storage Engine | Data Size            | Index Size           | Table Size           |
+----------------+----------------------+----------------------+----------------------+
| InnoDB         |             0.188 MB |             0.250 MB |             0.438 MB |
| MyISAM         |           181.114 MB |            61.270 MB |           242.384 MB |
| Total          |           181.302 MB |            61.520 MB |           242.821 MB |
+----------------+----------------------+----------------------+----------------------+
share|improve this question

1 Answer 1

We would need to know how much data there is for MyISAM and InnoDB

Send the result of this query in MB.

SELECT IFNULL(B.engine,'Total') "Storage Engine", CONCAT(LPAD(REPLACE(FORMAT(B.DSize/POWER(1024,pw),3),',',''),17,' '),' ',SUBSTR(' KMGTP',pw+1,1),'B') "Data Size", CONCAT(LPAD(REPLACE(FORMAT(B.ISize/POWER(1024,pw),3),',',''),17,' '),' ',SUBSTR(' KMGTP',pw+1,1),'B') "Index Size", CONCAT(LPAD(REPLACE(FORMAT(B.TSize/POWER(1024,pw),3),',',''),17,' '),' ',SUBSTR(' KMGTP',pw+1,1),'B') "Table Size" FROM (SELECT engine,SUM(data_length) DSize,SUM(index_length) ISize,SUM(data_length+index_length) TSize FROM information_schema.tables WHERE table_schema NOT IN ('mysql','information_schema') AND engine IS NOT NULL GROUP BY engine WITH ROLLUP) B,(SELECT 2 pw) A ORDER BY TSize;

share|improve this answer
    
edit my post above with the details so it shows better –  Mike Williams Feb 2 '11 at 19:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.