tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

where is my memory?



So I've recently been exploring a pretty common mystery on netbsd
machines- where is my memory?

No matter where I look I can't seem to get anything to add up.

This box has 256MB of memory and 267MB of swap.
hw.physmem64 = 268435456
hw.usermem64 = 267505664

From top:
Memory: 39M Act, 15M Inact, 904K Wired, 9872K Exec, 34M File, 118M Free
Swap: 267M Total, 10M Used, 257M Free

Swap seems fine but if I add up the memory I'm missing 40MB.

This should tell me that my kernel overhead is 40MB of space since
according to the uvm faq:  (is kernel overhead the size of the kernel
in memory?)

"In UVM, your total virtual memory is equal to the size of your
physical RAM (minus kernel overhead) plus the size of each swap
partition. In other words, physical memory doesn't have to be backed
by a paging device."

According to top my kernel RES is 8MB:
  PID USERNAME PRI NICE   SIZE   RES STATE      TIME   WCPU    CPU COMMAND
    0 root     126    0     0K 8388K pgdaemon   8:47  0.00%  0.00% [system]

vmstat -m reported 61MB:
In use 59189K, total allocated 63353K; utilization 93.4%

Another mystery comes from vmstat -s where it talks about managing
"61421 pages managed" == 240MB, so here I'm missing 16MB.

I feel like being able to access pmap_statistics might give some
insight, but I'm not sure how to do that.  Any hints?

If someone can push me in the right direction I'd appreciate it.

Matt


Home | Main Index | Thread Index | Old Index