[Gluster-users] strange memory consumption with libgfapi

Pavel Cernohorsky pavel.cernohorsky at appeartv.com
Tue Oct 25 07:11:40 UTC 2016


Hello,

I was experimenting with libgfapi a bit and found something which I 
cannot explain.

I wanted to simulate a behavior of long running system, so I created a 
simple program which reads a file from Gluster volume, saves it under a 
new name, deletes the original file and prints out the memory 
statistics. And again, reads the file saved in the last round, saves a 
new one, … But it seems that such a program just consumes memory 
indefinitely.

The full source code of the program is attached, or available on 
http://pastebin.com/9emyDH5N. It is not a production ready code, just an 
experiment, but Gluster usage should be correct there.

My volume consists of 2 bricks, no replication, default options, Gluster 
server and client have both the same version 3.8.4-1.fc24. The file I am 
using for experiments is ~70 bytes. Program started on 70MB RSS and the 
last time I checked it was 250MB. Unfortunately it is not possible to 
use valgrind properly, because libgfapi seems to leak just by 
initializing and deinitializing (tested with different code).

Is there some call in the library to free the memory that I am not 
using? Some settings of the volume?

Thanks for your suggestions, kind regards,
Pavel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: glfs_new_files.cpp
Type: text/x-c++src
Size: 5152 bytes
Desc: not available
URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20161025/79aa33c2/attachment.bin>


More information about the Gluster-users mailing list