P
P
Pu4u2015-10-09 20:09:11
MySQL
Pu4u, 2015-10-09 20:09:11

Why is MySQL taking up little memory?

We rent VPS on Red Hat 4.4.6-4. MySQL at its peak eats up 190MB of RAM.
The tariff plan was changed, now it is 2 GB (so the memory occupied by php at the peak can be up to 2000 MB, i.e. the tariff seems to be honest), the memory occupied by the muscle has not changed.
I look at the RAM of processes with the command

ps axo rss,comm,pid \
| awk '{ proc_list[$2]++; proc_list[$2 "," 1] += $1; } \
END { for (proc in proc_list) { printf("%d\t%s\n", \
proc_list[proc "," 1],proc); }}' | sort -n | tail -n 10 | sort -rn \
| awk '{$1/=1024;printf "%.0fMB\t",$1}{print $2}'

I changed the config from my-small.cnf to my-medium.cnf, my-large.cnf - the memory occupied and the performance of mysql do not change ...
The table type is InnoDB, the base weight is 500MB, caching is not used (in theory it is not necessary).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
ldv, 2015-10-09
@Pu4u

dev.mysql.com/doc/refman/5.6/en/innodb-parameters....
try setting it to 1000M and look for more mysql optimization tips for innodb

N
nonname, 2015-10-30
@nonname

You need to understand that the DBMS does not just take this place, it is a buffer of read data, so in order to take, roughly speaking, 1GB of the buffer, you first need to read 1GB from the data file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question