I am running an application which uses a huge memory mapped file on two different machines (CentOS 7).

I found that the same program's performance is significantly different when it's running on two different machines.

The reason was that one machine uses excessive amount of disk I/O, since most of the pages are swap-out to disks.

When I run top command, the shared-memory region's size is just about few megabytes on the slow machine. On the faster machine, the shared-memory region's size is about 6GB, which means that most of the data are cached on OS page cache.

I checked that there are enough (more than 16GB) free memory space which is enough to cache the whole memory mapped file.

Can any one give me an idea on this issue?

  • 2
    I think the issue is swap, not mmap, and I assume there are different settings (and priorities) on how/when to swap. BTW use vmstat instead of top to debug memory issues. – Giacomo Catenazzi Nov 5 '16 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.