I ran MySQLTuner to verify the configuration of a MySQL database, and it reported this problem:
[!!] Maximum possible memory usage: 40.9G (1022% of installed RAM)
These figures come from computing
max_connections multiplied by
join_buffer_size in the
my.cnf file, which effectively gives 40Gb.
However, the server has 128Gb of RAM. It appears that MySQL only sees 4Gb.
At first I thought that this was because a MySQL 32-bit binary on a 64-bit OS can effectively access only 4Gb of RAM. However, both MySQL binary and OS are 64-bit:
root@box# isainfo -v 64-bit amd64 applications pclmulqdq aes sse4.2 sse4.1 ssse3 popcnt tscp ahf cx16 sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu 32-bit i386 applications pclmulqdq aes sse4.2 sse4.1 ssse3 popcnt tscp ahf cx16 sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu root@box# uname -a SunOS box 5.11 11.2 i86pc i386 i86pc root@box# file /usr/local/bin/mysql /usr/local/bin/mysql: ELF 64-bit LSB executable AMD64 Version 1 [SSE2 SSE FXSR CMOV FPU], dynamically linked, not stripped
and there is no limit on how much memory a process can access:
root@box# ulimit -a address space limit (kbytes) (-M) unlimited core file size (blocks) (-c) unlimited cpu time (seconds) (-t) unlimited data size (kbytes) (-d) unlimited file size (blocks) (-f) unlimited locks (-x) not supported locked address space (kbytes) (-l) not supported message queue size (kbytes) (-q) not supported nice (-e) not supported nofile (-n) 256 nproc (-u) 29995 pipe buffer size (bytes) (-p) 5120 max memory size (kbytes) (-m) not supported rtprio (-r) not supported socket buffer size (bytes) (-b) 5120 sigpend (-i) 128 stack size (kbytes) (-s) 8192 swap size (kbytes) (-w) not supported threads (-T) not supported process size (kbytes) (-v) unlimited
Is there another way I can see how much memory MySQL is effectively using?
(In case you ask, shell is tcsh; I cannot tag the post "tcsh" due to insufficient privileges.)