mmap performance and memory use

Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl
Thu Oct 6 15:12:47 UTC 2011


i have few questions.

1) suppose i map 1TB of address space as anonymous and touch just one 
page. how much memory is used to manage this?

2) suppose we have 1TB file on disk without holes and 100000 processes 
mmaps this file to it's address space. are just pages shared or can 
pagetables be shared too? how much memory is used to manage such 
situation?

yes this is a real question - assume most of these processes are mostly 
sleeping but every now and then do something and work of some set of 
pages from this file and there is enough memory in computer to keep this 
working set, but only if managing it by OS will not overuse memory.


More information about the freebsd-hackers mailing list