Pinboard (jm)
https://pinboard.in/u:jm/public/
recent bookmarks from jmTransparent huge pages implicated in Redis OOM2015-03-23T14:00:34+00:00
https://shk.io/2015/03/22/transparent-huge-pages/
jmjemalloc(3) extensively uses madvise(2) to notify the operating system that it's done with a range of memory which it had previously malloc'ed. The page size on this machine is 2MB because transparent huge pages are in use. As such, a lot of the memory which is being marked with madvise(..., MADV_DONTNEED) is within substantially smaller ranges than 2MB. This means that the operating system never was able to evict pages which had ranges marked as MADV_DONTNEED because the entire page has to be unneeded to allow a page to be reused. Despite initially looking like a leak, the operating system itself was unable to free memory because of madvise(2) and transparent huge pages. This led to sustained memory pressure on the machine and redis-server eventually getting OOM killed.
]]>oom-killer oom linux ops thp jemalloc huge-pages madvise redis memoryhttps://pinboard.in/https://pinboard.in/u:jm/b:9b3c5ea145c2/