Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Huge pages and free memory.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Mon Jul 13, 2015 2:03 am    Post subject: Huge pages and free memory. Reply with quote

Quote:
There's nothing called free lunch.


Whenever an application is using hugepages via hugetlbfs, it preallocates a certain amount of memory (the maximum that it'll take); off the preallocated amount, in the beginning, only a small amount of it will be used (calculated with 'used - free' huge pages in /etc/meminfo); however it takes all of the preallocated memory from the physical ram.

So suppose qemu takes 1G memory, off which 20 MB is in use, the rest of it will be waisted in locked qemu memory.

Is this true? Or is there more to it?
_________________
My blog
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 309

PostPosted: Mon Jul 13, 2015 4:15 am    Post subject: Reply with quote

If you prefer to on-demend memory allocation, you should enable CONFIG_COMPACTION, CONFIG_MIGRATION, CONFIG_TRANSPARENT_HUGEPAGE.
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Mon Jul 13, 2015 7:40 am    Post subject: Reply with quote

s4e8 wrote:
If you prefer to on-demend memory allocation, you should enable CONFIG_COMPACTION, CONFIG_MIGRATION, CONFIG_TRANSPARENT_HUGEPAGE.


Yeah, I'm already aware of that.
_________________
My blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum