mmap() only version of ptmalloc3 and how to benchmark it
Hello, I am a undergraduate student currently and I am working on a version of ptmalloc3 that uses only mmap() system call to satisfy all types of allocation requests and use of brk() is completely removed/avoided as college project. The memory allocated using mmap() is also backed by a disk file (which helps to reduce swap-in + swap-out time of process but adds a extra overhead). Considering the case where only a single resource intensive and critical application is using this version of ptmalloc for allocation purposes. Rest of the programs are using default implementation. Then in this case this will be saving swap-in + swap-out time but will add disk file read+write overheads and also sync overhead. So considering all these points, is it of any advantage to save on swapping time while having all those extra overheads. Also could you please point out how I can benchmark it and test how my version is working against the original one. Thank you. Kind regards, Aaditya Gavandalkar
On Wed, 28 May 2014 12:37:48 -0700, Aaditya Gavandalkar said:
So considering all these points, is it of any advantage to save on swapping time while having all those extra overheads.
The short answer is "it depends". The long answer is "it depends". Do you have actual numbers that show a saving in swapping time? If so, how much of a reduction? Is there a difference if you're only slightly into swap (maybe 50M or so), or heavily into swap (multiple gigabytes) but most swap-resident pages are old and inactive (for instance, your Firefox image when you come in in the morning, after it's been forced out to swap by a 2AM backup), or heavily into swap and high activity (in other words, if your system is thrashing)? Which is more important, saving on swapping time because you have an elapsed-time issue (for instance, a backup service that isn't making an allotted time window), or the overhead (if your server is already running at 90% CPU)? And the first question that my boss is going to ask me in this situation is "Why doesn't a server that's running a critical application have enough RAM installed so that you don't ever hit swap in the first place?" (You want to see painful? An SGI UV system that has 2.7T of RAM (*not* a typo) and it's swapping. Ouch doesn't begin to describe it...)
participants (2)
-
Aaditya Gavandalkar -
Valdis.Kletnieks@vt.edu