Eu encontrei uma discussão sobre ServerFault que discute isso. Basicamente,
$ sudo grep huge /proc/*/numa_maps
/proc/4131/numa_maps:80000000 default file=/anon_hugepage0(deleted) huge anon=4 dirty=4 N0=3 N1=1
/proc/4131/numa_maps:581a00000 default file=/anon_hugepage0(deleted) huge anon=258 dirty=258 N0=150 N1=108
/proc/4131/numa_maps:7f6c40400000 default file=/anon_hugepage0(deleted) huge
/proc/4131/numa_maps:7f6ce5000000 default file=/anon_hugepage0(deleted) huge anon=1 dirty=1 N0=1
/proc/4153/numa_maps:80000000 default file=/anon_hugepage0(deleted) huge anon=7 dirty=7 N0=6 N1=1
/proc/4153/numa_maps:581a00000 default file=/anon_hugepage0(deleted) huge anon=265 dirty=265 N0=162 N1=103
/proc/4153/numa_maps:7f3dc8400000 default file=/anon_hugepage0(deleted) huge
/proc/4153/numa_maps:7f3e00600000 default file=/anon_hugepage0(deleted) huge anon=1 dirty=1 N0=1
e obtendo o nome do processo
$ ps 4131
PID TTY STAT TIME COMMAND
4131 ? Sl 1:08 /var/lib/jenkins/java/bin/java -jar slave.jar
$ ps 4153
PID TTY STAT TIME COMMAND
4153 ? Sl 1:09 /var/lib/jenkins/java/bin/java -jar slave.jar
lhe dará uma idéia de quais processos estão usando memória enorme.
$ grep HugePages /proc/meminfo
AnonHugePages: 1079296 kB
HugePages_Total: 4096
HugePages_Free: 3560
HugePages_Rsvd: 234
HugePages_Surp: 0
$ sudo ~/bin/counthugepages.pl 4153
273 huge pages
$ sudo ~/bin/counthugepages.pl 4131
263 huge pages
A soma de páginas livres (3560) mais as páginas do processo 2 (273 + 263) é igual a 4096. Todos contabilizados!
O script perl para somar os campos dirty=
está aqui: