From: Wilson, S. M <st...@pu...> - 2016-10-05 13:49:01
|
> "Wilson, Steven M" <st...@pu...> writes: > >> I've noticed that the mfsmaster daemon doesn't seem to relinquish > memory once it has allocated it for metadata. > >I would be extremely surprised if that's the case. There may be memory >leaks in MooseFS -- programmers aren't infallible -- but something as >blatant as that I find hard to believe. I certainly don't think it's a blatant oversight on the part of the developers but rather a design decision. On the "Info" page of the CGI display the first two lines under "Memory usage detailed info" are "used" and "allocated". Looking at our server that peaked at a little over 200 million files and is now down to about 140 million files, I see 42GiB being used but 68GiB allocated. I think that only restarting mfsmaster will set the allocated memory back down to the memory that is actually needed and used. This can be seen graphically on the "Master Charts" tab under "memory usage". I see only an ever-increasing graph of memory usage *except* for those times when I've had to restart the mfsmaster daemon. > >You may be forgetting two things: > >- MooseFS has the ability to keep files around for a while after they're > deleted, so that you can undelete them. If you're using that feature, > there will be metadata still around until the deleted files time out. Good suggestion but I've taken this into consideration and my numbers reflect both active files and those that are in the trash area. > >- Unix doesn't normally shrink the virtual data segment size of a > process just because malloc'ed memory has been freed. It is > technically possible for it to do so, limited by the maximum virtual > address of malloc'ed memory still in use, but it's really not needed: > free'd virtual memory will be reused by malloc. Using top, it looks like resident memory is almost equal to the amount of virtual memory for the mfsmaster process indicating that the memory is not only allocated but also occupying physical memory. Steve |