Dear list,
I've been searching the archives before posting this request since it
is about something you've already discussed. But I didn't find the
solution, so here it comes my question.
It is about RAM consuming.
I'm running a PHP/mysql application on a redhat 8.1 - kernel 2.4-18 -
512 MB RAM system.
I'm using mysql 3.23.54a mysql-server and PHP 4.2.2.
I understand that mysqld won't steal too much RAM as long as it is well
tuned.
I'm not sure I succeeded in tuning the mysqld so here it follows the
relavant part of my.cnf, the values are calculated by logging the
mysqld status:
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = table_cache=100
set-variable = sort_buffer=512k
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=8M
set-variable = max_connections=200
set-variable = max_user_connections=200
set-variable = wait_timeout=300
skip-innodb
skip-bdb
While there are 23 threads running and 100 opened tables, I see from
the "top" tool that a great amount of RAM is allocated as "cached".
Typically from 200 to 350 MB, leaving the rest to the processes. This
leads very soon to a degradation of the system performance (the swap
memory increases dramatically). In some other posts of this list I
found out that this couldn't be neccessarily related to mysqld
activities but to some other linux kernel matters (I didn't understand
which one precisely).
Well, I have another server, configured exactly as the previous one.
This is a sort of backup server ready to be used in case the main one
crashes. No one but me is accessing this second server.
I notice that the amount of RAM allocated as "cached" is pretty low
(around 80MB). But at the time I start browsing some web pages
(involving mysql queries) the RAM used as "cached" increases quickly.
Am I wrong in thinking that there must be some relationship between
mysql queries and kernel cache memory? (maybe filesystem caching
related to index and tables files??)
I cannot find out how to prevent the kernel from caching so much memory.
The only thing I've been able to do for now is just rebooting the
system.
Of course I cannot keep doing that.
What is wrong? Is something that I have to fix on the mysql side or on
the linux side?
This is driving me crazy so any help would be precious and appreciated.
Thank you.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php