[LU-4740] MDS - buffer cache not freed Created: 08/Mar/14 Updated: 09/Oct/21 Resolved: 09/Oct/21 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.4.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Roland Fehrenbacher | Assignee: | WC Triage |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
vanilla 2.6.32.61 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Severity: | 4 | ||||||||
| Rank (Obsolete): | 13030 | ||||||||
| Description |
|
On our MDS, we seem to have a memory leak related to buffer cache that is After a fresh reboot the buffer cache is filling up quickly. After a while RAM is used up and the machine starts swapping basically bringing Luster to a halt The strange thing is that $ echo 3 > /proc/sys/vm/drop_caches only frees part of the allocated buffer cache and after a while the unreclaimable part fills up RAM completely leading to the swap disaster. Setting /proc/sys/vm/vfs_cache_pressure > 100 doesn't help and Also strange: After unmounting all Lustre targets and even unloading the Lustre kernel modules the kernel still shows the amount of previously allocated buffer cache as used memory even though the amount of buffer cache is then shown as close to zero. So it seems we have big memory leak. |
| Comments |
| Comment by Roland Fehrenbacher [ 11/Mar/14 ] |
|
I have appended the output of /proc/meminfo and "slabtop -o -s c". Additionally, I've compiled in |
| Comment by Bernd Schubert [ 11/Mar/14 ] |
|
According to meminfo swap is not used at all. Are you sure the logs are from the time when the issue comes up? |
| Comment by Roland Fehrenbacher [ 11/Mar/14 ] |
|
No, these files were from about 1 hour after I started Lustre. MemTotal - MemFree = MemUsed = 18GB Also and most fatal buffer cache is not cleared by drop_caches. Finally the last pair is right after I unmounted Lustre. The buffer cache is cleared, |
| Comment by Andreas Dilger [ 12/Mar/14 ] |
|
Roland, is it possible for you to test this with the current master branch? There have been a number of fixes related to memory usage on both the client and server. In particular, http://review.whamcloud.com/9223 fixed an allocation problem in 2.4 and 2.5, and there are others that are linked under |
| Comment by Roland Fehrenbacher [ 13/Mar/14 ] |
|
Andreas, I'll try. Can a 2.5.56 (git master) MDS/MDT work with 2.4.2 OSS/OSTs or do I need to update |
| Comment by Andreas Dilger [ 21/Mar/14 ] |
|
The 2.5 MDS is tested with 2.4 clients. We haven't tested with 3.14 clients, but I expect those to be similar to 2.4.x. |
| Comment by Roland Fehrenbacher [ 12/Apr/14 ] |
|
Andreas, the issue is still there with 2.5.1 (where http://review.whamcloud.com/9223 is included) on the servers. http://review.whamcloud.com/#/c/7942/ which is also referenced under
|
| Comment by Andreas Dilger [ 12/Apr/14 ] |
|
I would say that with the two -1 reviews on the 7942 patch should NOT be used in production. If the memory is not listed in slabs or in /proc/sys/lnet/memused then it is not being allocated directly by Lustre (which would print a "memory leaked" message at unmount. If the memory is not allocated directly by Lustre then the Lustre memory debugging code would not be useful for debugging this. It might be a bug in the ldiskfs code but it is hard to know. Are there unusual uses of the filesystem (e.g. Many create delete cycles in large directories) or some other way that this could be reproduced easily? Have you tried running with a server kernel using the in-kernel memory leak checking? I don't know much of the details, but I think this can be compiled for RHEL kernels. |