On Fri, Feb 13, 2015 at 3:52 AM, Cheng Rk <crquan@xxxxxxxxx> wrote: > > > Hi, > > I have a system that application is doing a loop on top of block device, > (which I think is stupid,) > as more and more memory goes into Buffers, then applications started > to get -ENOMEM or be oom-killed later (depends on vm.overcommit_memory setting) > > > In this case, if I do a manual reclaim (echo 3 > /proc/sys/vm/drop_caches) > I see 90+% of the Buffers is reclaimable, but why it's not reclaimed > to fullfill applications' memory allocation request? > > > > -bash-4.2$ sudo losetup -a > /dev/loop0: [0005]:16512 (/dev/dm-2) > -bash-4.2$ free -m > total used free shared buffers cached > Mem: 48094 46081 2012 40 40324 2085 > -/+ buffers/cache: 3671 44422 > Swap: 8191 5 8186 > > > I've tried sysctl mm.vfs_cache_pressure=10000 but that seems working to Cached > memory, I wonder is there another sysctl for reclaming Buffers? AFAIK "Buffers" is just a page-cache of block devices. >From reclaimer's point of view they have no difference from file page-cache. Could you post oom-killer log, there should be a lot of numbers describing memory state. > > > Thanks, > > - Derek > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@xxxxxxxxx. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>