| Summary: | md-cache: dict caching results in significant memory usage | ||
|---|---|---|---|
| Product: | Red Hat Gluster Storage | Reporter: | Brian Foster <bfoster> |
| Component: | glusterfs | Assignee: | Brian Foster <bfoster> |
| Status: | CLOSED ERRATA | QA Contact: | Sachidananda Urs <surs> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.0 | CC: | amarts, gluster-bugs, jdarcy, sac, sdharane, vbellur |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | glusterfs-3.4.0qa4-1.el6rhs | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-09-23 22:32:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Brian Foster
2012-04-16 13:15:43 UTC
I'll try to add an lru mechanism to md-cache (i.e., similar to quick-read) to try and control this behavior... Avati's comments: "You make a good observation. The problem I suspect is because of the loaded quick-read translator which results in returning of file data in the lookup_cbk's xattr dict. The md-cache's xattr cache is a superset of which is needed (basically the entire xattr dictionary which also holds quick-read's response and not just the interested keys of md-cache). What is noted might very well be the same overrun behavior of quick-read, and for the same data element (rather than extended attributes). It would be interesting to see if we fix the *xatt_set() in md-cache to selectively dup just the required attributes and cache only those rather than blindly storing the entire dict as-is (and thereby caching file contents which were present to satisfy quick-read's request)." --- I reproduce a reduction in glusterfs RSS from 28GB to 1.3GB with a particular dataset by removing quick-read from the client graph, which validates the above. Suggestion from Amar: < amarts> and about md-cache + quick-read consuming extra memory, we were thinking just doing a 'dict_del(GF_CONTENT_KEY);' in quick-read's lookup_cbk(), before unwind CHANGE: http://review.gluster.com/3268 (quick-read, md-cache: selectively cache xattr data to conserve memory) merged in master by Anand Avati (avati) Tested with more than 10 replicated kernel sources, metadata intensive operations. Memory usage more or less remained constant around 310M. Couldn't even hit close to 1G. (Earlier hitting around 8G for a couple of replicated kernel sources). Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1262.html |