Bug 77411 - Increased disk activity causes high memory usage due to caches
Summary: Increased disk activity causes high memory usage due to caches
Status: NEW
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew Morton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-06 14:24 UTC by Mircea Kitsune
Modified: 2014-06-06 14:24 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.11.10
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Mircea Kitsune 2014-06-06 14:24:01 UTC
A few days ago, I enabled the new file indexing system in KDE called Baloo, to test how it behaves in regard to performance and resources. I soon had to disable it, because Baloo would constantly eat up my system RAM. Initially I thought it's a memory leak, so I brought it up on the KDE forum. But I was explained that what's happening is a Kernel problem instead. This is the KDE thread:

http://forum.kde.org/viewtopic.php?f=154&t=121495

The issue from what I could understand, is that the Kernel fills system memory with pagecache / inode / dentry caches the more intensively reading / writing takes place on a disk. File indexers are said to be a common cause that triggers this. The excess memory is recovered by running the following command:

echo 3 > /proc/sys/vm/drop_caches

In my case, this can cause Baloo to fill the memory with about 1 GB in a few hours. Although I was told this extra memory usage should be harmless, I get the impression it contributes to minor slowdowns, and I'm also worried that it might cripple applications that use a lot of RAM.

I'm far from a Kernel expert, so I don't know how this can or should be fixed. I can only imagine that the Kernel might be able to track when a page / inode / dentry cache was last used, and if it's older than a certain number of minutes delete it. Maybe it already does this, but not quickly enough? I hope any solution to improve this can however be found.

Note You need to log in before you can comment on or make changes to this bug.