[Beowulf] physical memory
Hearns, John
john.hearns at mclaren.com
Wed Apr 24 07:44:50 PDT 2013
> Does linux recombine physical memory into contiguous regions?
> My impression has been "no". Somewhere down in the guts of the kernel there is the "slab" allocator, which maintains a data structure of free memory in power-of-two sizes. As memory > is used, the chunks get broken up and naturally migrate towards the small, fragmented end of the allocator.
Interestingly enough, I have just been looking at this, not directly for HPC tasks but in connection with a backup software package which hit a bug.
Look at cat /proc/buddyinfo
If your kernel has the CONFIG_COMPACTION flag set (but it does need to be compiled with that flag) You can trigger a memory decompaction by
echo 1 > /proc/sys/vm/compact_memory
(Oh Dear Lord - WHY have I referenced echoing ANYTHING to /proc/sys/vm again.)
And, yes, if you do a drop cache it does have an effect of the fragmentation as evidenced in /proc/buddyinfo
Mark Hahn will love me for that comment....
Ps. If I have misunderstood the original poster's comments, forgive me.
I have had my head stuck in slabtop /proc/meminfo and /proc/buddyinfo and examining over the past few days to look at this issue,
I may have become somewhat deranged by it.
The contents of this email are confidential and for the exclusive use of the intended recipient. If you receive this email in error you should not copy it, retransmit it, use it or disclose its contents but should return it to the sender immediately and delete your copy.
More information about the Beowulf
mailing list