Hello,

I was wondering about the memory indications displayed at boot time. For
example:

# dmesg| grep memory
real memory  = 51539607552 (49152 MB)
avail memory = 49663688704 (47362 MB)

The "real memory" is the size of the RAM modules in this computer (48 Gb).

What's "avail memory"? The memory left after loading the kernel and its data
structures?

# sysctl -a | grep -i "hw.[a-z]*mem"
hw.physmem: 51469168640
hw.usermem: 48338657280
hw.realmem: 53418655744

How come "physmem" be lower and "realmem" be higher than "real memory"?

As an exercise, i've been unable to malloc more than 38 Gb of memory,
despite having at least 43 Gb free at the time:

# sysctl -a | egrep
"vm.stats.vm.v_(free_count|inactive_count|cache_count|page_size)"
vm.stats.vm.v_cache_count: 19
vm.stats.vm.v_inactive_count: 2113
vm.stats.vm.v_free_count: 11414720
vm.stats.vm.v_page_size: 4096
# sysctl kern.maxdsiz
kern.maxdsiz: 51539607552
# mdconfig -a -t malloc -o reserve -s 38g
md0
# mdconfig -d -u 0
# mdconfig -a -t malloc -o reserve -s 39g
mdconfig: ioctl(/dev/mdctl): Cannot allocate memory

Just for the sake of curiosity, any idea about why?

Best regards,

Hubert
-- 
View this message in context: 
http://old.nabble.com/phys-vs-real-vs-user-%28avail%29-memory--tp28505453p28505453.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to