R
R
Roman Ilyin2013-04-17 17:53:40
MySQL
Roman Ilyin, 2013-04-17 17:53:40

High consumption of MySQL virtual memory on OpenVZ?

Good evening.
Available: VPS (intovps.com) based on OpenVZ
Server with Ubuntu 12.04
After a clean install of nginx and mysql, I found that MySQL consumes 340-350 MB of VIRT memory. This problem was known to me and I tried to limit the consumption with the command ulimit -s 1024, to my surprise it did not help. Also tried to register this command in rc.
All configs are basic. Please help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
akamajoris, 2013-04-17
@akamajoris

I encountered this problem myself. Disabling InnoDB and Network helped. Consumption has dropped by about half.

E
egorinsk, 2013-04-17
@egorinsk

VIRT is the size of the process's address space (well, something like that), not the memory consumed. The real allocated memory is closer to the figure that is written in RSS. Therefore, 350 MB should not bother you, but if you want to know the reason, then you need to pmap the mysql process - it will show where the memory is used.
By the way, where did you write ulimit? I suspect you just entered it in the wrong place if it does not work.
Also, I advise you to leave OpenVZ hosting. They do not take into account real memory consumption, but this very VIRT (which is much larger), and due to this, hosters sell more memory than the server has (how much more depends only on the greed of the hoster). And the client, accordingly, receives less than he would receive from Xen or a real machine of a similar configuration. You will have to constantly suffer with software optimization (since many programs allocate address space, not counting it, it is also virtual) and you will have to deal with program crashes due to memory overruns. Do you need it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question