<div dir="ltr">google vdsm memory leak..it's been discussed on list last year and earlier this one...<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 24, 2015 at 10:14 AM, Oleksandr Natalenko <span dir="ltr"><<a href="mailto:oleksandr@natalenko.name" target="_blank">oleksandr@natalenko.name</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In our GlusterFS deployment we've encountered something like memory leak in GlusterFS FUSE client.<br>
<br>
We use replicated (×2) GlusterFS volume to store mail (exim+dovecot, maildir format). Here is inode stats for both bricks and mountpoint:<br>
<br>
===<br>
Brick 1 (Server 1):<br>
<br>
Filesystem                       Inodes  IUsed   IFree IUse% Mounted on<br>
/dev/mapper/vg_vd1_misc-lv08_mail          578768144 10954918 567813226  2% /bricks/r6sdLV08_vd1_mail<br>
<br>
Brick 2 (Server 2):<br>
<br>
Filesystem                       Inodes  IUsed   IFree IUse% Mounted on<br>
/dev/mapper/vg_vd0_misc-lv07_mail          578767984 10954913 567813071  2% /bricks/r6sdLV07_vd0_mail<br>
<br>
Mountpoint (Server 3):<br>
<br>
Filesystem               Inodes  IUsed   IFree IUse% Mounted on<br>
glusterfs.xxx:mail          578767760 10954915 567812845  2% /var/spool/mail/virtual<br>
===<br>
<br>
glusterfs.xxx domain has two A records for both Server 1 and Server 2.<br>
<br>
Here is volume info:<br>
<br>
===<br>
Volume Name: mail<br>
Type: Replicate<br>
Volume ID: f564e85c-7aa6-4170-9417-1f501aa98cd2<br>
Status: Started<br>
Number of Bricks: 1 x 2 = 2<br>
Transport-type: tcp<br>
Bricks:<br>
Brick1: server1.xxx:/bricks/r6sdLV08_vd1_mail/mail<br>
Brick2: server2.xxx:/bricks/r6sdLV07_vd0_mail/mail<br>
Options Reconfigured:<br>
nfs.rpc-auth-allow: <a href="http://1.2.4.0/24,4.5.6.0/24" rel="noreferrer" target="_blank">1.2.4.0/24,4.5.6.0/24</a><br>
features.cache-invalidation-timeout: 10<br>
performance.stat-prefetch: off<br>
performance.quick-read: on<br>
performance.read-ahead: off<br>
performance.flush-behind: on<br>
performance.write-behind: on<br>
performance.io-thread-count: 4<br>
performance.cache-max-file-size: 1048576<br>
performance.cache-size: 67108864<br>
performance.readdir-ahead: off<br>
===<br>
<br>
Soon enough after mounting and exim/dovecot start, glusterfs client process begins to consume huge amount of RAM:<br>
<br>
===<br>
user@server3 ~$ ps aux | grep glusterfs | grep mail<br>
root   28895 14.4 15.0 15510324 14908868 ?  Ssl Sep03 4310:05 /usr/sbin/glusterfs --fopen-keep-cache --direct-io-mode=disable --volfile-server=glusterfs.xxx --volfile-id=mail /var/spool/mail/virtual<br>
===<br>
<br>
That is, ~15 GiB of RAM.<br>
<br>
Also we've tried to use mountpoint withing separate KVM VM with 2 or 3 GiB of RAM, and soon after starting mail daemons got OOM killer for glusterfs client process.<br>
<br>
Mounting same share via NFS works just fine. Also, we have much less iowait and loadavg on client side with NFS.<br>
<br>
Also, we've tried to change IO threads count and cache size in order to limit memory usage with no luck. As you can see, total cache size is 4×64==256 MiB (compare to 15 GiB).<br>
<br>
Enabling-disabling stat-prefetch, read-ahead and readdir-ahead didn't help as well.<br>
<br>
Here are volume memory stats:<br>
<br>
===<br>
Memory status for volume : mail<br>
----------------------------------------------<br>
Brick : server1.xxx:/bricks/r6sdLV08_vd1_mail/mail<br>
Mallinfo<br>
--------<br>
Arena  : 36859904<br>
Ordblks : 10357<br>
Smblks  : 519<br>
Hblks  : 21<br>
Hblkhd  : 30515200<br>
Usmblks : 0<br>
Fsmblks : 53440<br>
Uordblks : 18604144<br>
Fordblks : 18255760<br>
Keepcost : 114112<br>
<br>
Mempool Stats<br>
-------------<br>
Name              HotCount ColdCount PaddedSizeof AllocCount MaxAlloc  Misses Max-StdAlloc<br>
----Â Â Â Â Â Â Â Â Â Â Â Â Â Â -------- --------- ------------ ---------- -------- -------- ------------<br>
mail-server:fd_t            0   1024     108  30773120   137    0      0<br>
mail-server:dentry_t        16110    274      84 235676148  16384 1106499     1152<br>
mail-server:inode_t        16363    21     156 237216876  16384 1876651     1169<br>
mail-trash:fd_t            0   1024     108     0    0    0      0<br>
mail-trash:dentry_t          0   32768      84     0    0    0      0<br>
mail-trash:inode_t           4   32764     156     4    4    0      0<br>
mail-trash:trash_local_t        0    64     8628     0    0    0      0<br>
mail-changetimerecorder:gf_ctr_local_t     0    64    16540     0    0    0      0<br>
mail-changelog:rpcsvc_request_t     0     8     2828     0    0    0      0<br>
mail-changelog:changelog_local_t     0    64     116     0    0    0      0<br>
mail-bitrot-stub:br_stub_local_t     0    512      84   79204    4    0      0<br>
mail-locks:pl_local_t         0    32     148  6812757    4    0      0<br>
mail-upcall:upcall_local_t       0    512     108     0    0    0      0<br>
mail-marker:marker_local_t       0    128     332   64980    3    0      0<br>
mail-quota:quota_local_t        0    64     476     0    0    0      0<br>
mail-server:rpcsvc_request_t      0    512     2828  45462533    34    0      0<br>
glusterfs:struct saved_frame      0     8     124     2    2    0      0<br>
glusterfs:struct rpc_req        0     8     588     2    2    0      0<br>
glusterfs:rpcsvc_request_t       1     7     2828     2    1    0      0<br>
glusterfs:log_buf_t          5    251     140    3452    6    0      0<br>
glusterfs:data_t           242   16141      52 480115498   664    0      0<br>
glusterfs:data_pair_t        230   16153      68 179483528   275    0      0<br>
glusterfs:dict_t           23   4073     140 303751675   627    0      0<br>
glusterfs:call_stub_t         0   1024     3764  45290655    34    0      0<br>
glusterfs:call_stack_t         1   1023     1708  43598469    34    0      0<br>
glusterfs:call_frame_t         1   4095     172 336219655   184    0      0<br>
----------------------------------------------<br>
Brick : server2.xxx:/bricks/r6sdLV07_vd0_mail/mail<br>
Mallinfo<br>
--------<br>
Arena  : 38174720<br>
Ordblks : 9041<br>
Smblks  : 507<br>
Hblks  : 21<br>
Hblkhd  : 30515200<br>
Usmblks : 0<br>
Fsmblks : 51712<br>
Uordblks : 19415008<br>
Fordblks : 18759712<br>
Keepcost : 114848<br>
<br>
Mempool Stats<br>
-------------<br>
Name              HotCount ColdCount PaddedSizeof AllocCount MaxAlloc  Misses Max-StdAlloc<br>
----Â Â Â Â Â Â Â Â Â Â Â Â Â Â -------- --------- ------------ ---------- -------- -------- ------------<br>
mail-server:fd_t            0   1024     108  2373075   133    0      0<br>
mail-server:dentry_t        14114   2270      84  3513654  16384   2300     267<br>
mail-server:inode_t        16374    10     156  6766642  16384  194635     1279<br>
mail-trash:fd_t            0   1024     108     0    0    0      0<br>
mail-trash:dentry_t          0   32768      84     0    0    0      0<br>
mail-trash:inode_t           4   32764     156     4    4    0      0<br>
mail-trash:trash_local_t        0    64     8628     0    0    0      0<br>
mail-changetimerecorder:gf_ctr_local_t     0    64    16540     0    0    0      0<br>
mail-changelog:rpcsvc_request_t     0     8     2828     0    0    0      0<br>
mail-changelog:changelog_local_t     0    64     116     0    0    0      0<br>
mail-bitrot-stub:br_stub_local_t     0    512      84   71354    4    0      0<br>
mail-locks:pl_local_t         0    32     148  8135032    4    0      0<br>
mail-upcall:upcall_local_t       0    512     108     0    0    0      0<br>
mail-marker:marker_local_t       0    128     332   65005    3    0      0<br>
mail-quota:quota_local_t        0    64     476     0    0    0      0<br>
mail-server:rpcsvc_request_t      0    512     2828  12882393    30    0      0<br>
glusterfs:struct saved_frame      0     8     124     2    2    0      0<br>
glusterfs:struct rpc_req        0     8     588     2    2    0      0<br>
glusterfs:rpcsvc_request_t       1     7     2828     2    1    0      0<br>
glusterfs:log_buf_t          5    251     140    3443    6    0      0<br>
glusterfs:data_t           242   16141      52 138743429   290    0      0<br>
glusterfs:data_pair_t        230   16153      68 126649864   270    0      0<br>
glusterfs:dict_t           23   4073     140  20356289    63    0      0<br>
glusterfs:call_stub_t         0   1024     3764  13678560    31    0      0<br>
glusterfs:call_stack_t         1   1023     1708  11011561    30    0      0<br>
glusterfs:call_frame_t         1   4095     172 125764190   193    0      0<br>
----------------------------------------------<br>
===<br>
<br>
So, my questions are:<br>
<br>
1) what one should do to limit GlusterFS FUSE client memory usage?<br>
2) what one should do to prevent client high loadavg because of high iowait because of multiple concurrent volume users?<br>
<br>
Server/client OS is CentOS 7.1, GlusterFS server version is 3.7.3, GlusterFS client version is 3.7.4.<br>
<br>
Any additional info needed?<br>
_______________________________________________<br>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a></blockquote></div><br></div>