Rohit Peyyeti wrote:
Thanks for your quick response. Another question:

So, what you are saying is that sum of the memory (RES - 20m) of all the mysql processes shown with the 'top' command is not total memory occupied by mysql server? Like 22 threads*22m = 440MB?

Also, any idea why this keeps increasing?

Thanks,
Rohit


----- Original Message ----- From: "Lars Heidieker" <[EMAIL PROTECTED]>
To: "Rohit Peyyeti" <[EMAIL PROTECTED]>
Sent: Wednesday, February 01, 2006 4:37 PM
Subject: Re: Memory problems?


All these processes share the same address space (linux way of doing threads) therefor their sizes dont add up. It is correct one thread per connection plus a few from mysql (eg innodb has a few maintenance threads ....)

On 1 Feb 2006, at 12:00, Rohit Peyyeti wrote:

Gurus,

We have recently installed beta version of our application on IBM - Pentium Xeon - dual processor, 1 GB RAM, 80 GB HDD on Fedora Core 3 OS. The kernel version which I currently have is: 2.6.9-1.667 and Mysql Server version: 4.0.20-standard.

I have noticed that mysql processes (using 'top' command) take up substantial amount of memory over period of time. Please take a look at mysql processes output of 'top' command below:


PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2478 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.31 mysqld
2507 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.50 mysqld
2508 mysql 20 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2509 mysql 17 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2510 mysql 15 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2511 mysql 20 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2547 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.58 mysqld
2548 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.27 mysqld
2549 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2550 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.16 mysqld
2758 mysql 15 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2760 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:02.13 mysqld
2835 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:57.11 mysqld
2933 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2947 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2948 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2949 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2950 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2962 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2963 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2964 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld
2965 mysql 16 0 35036 20m 3616 S 0.0 2.1 0:00.00 mysqld

My question:

1) I see 20 processes in using the 'top' command but I have only 10 open connections (I am using connection pooling). Does it mean that processes shown in the top command and open connections are not related? Can somebody please clarify?

2) At the begining of the server startup, I have noticed that each mysql process under top command begin taking approx 10-12 MB. This kept increasing. The current memory occupied by one mysql process now is 20m (as you can see above). This memory only increases over the period, but I have never seen it coming down throughout the application use. Why is this so? Is there any problem with the application or the way mysql is configured?

Any pointers?

Thanks in advance,
Rohit


There is queries going on, so some data will be cached in memory. If memory serves me correctly, Linux won't clear out memory until it has to, so unless you are running low, that memory may stay in use until the Kernel cleans house. Unless you are into swap really badly, I wouldn't worry too much. As an aside, your memory of 1GB seems a bit low to me. If I was you, and I had the money, I would toss in another 1GB.

Take a look at your in use numbers. You may see that if you add up all the memory consumption of the system, that this will be greater than what is being displayed as in use. As the other respondent said, this is how Linux works.
--
Thanks,
James

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to