[ofa-general] Re: virtual memory usage on long lived apps

Roland Dreier rdreier at cisco.com
Mon Aug 6 17:33:15 PDT 2007


 > Running this server with clients repeatedly connecting,  running
 > rpings, and disconnecting, I notice that the virtual memory consumed
 > by the process is ever increasing.  The shared/and reserved values
 > don't increase, but the virtual does.  IE:  If you watch this process
 > via 'top' you'll see the VIRT value increasing steadily over
 > time/connections, and the RES/SHR values stay steady.  I've seen it
 > over 1GB of virtual memory used!

 > Q: Have you seen this before?  Its like the OS never reuses mappings
 > that were setup for memory registrations.  Is that normal? Or should
 > the virtual size shown in 'top' be reduced whenever a buffer is
 > unregistered and freed?  There's a definite possibility the code is
 > leaking memory, but I'm wondering if this is perhaps a normal anomaly
 > with mapping memory in linux...

I've not really tested an app like that, but I would expect that
freeing the memory should prevent your virtual space from growing.  I
would recheck your code and maybe add some tracing to make sure that
everything really does get freed -- or try the libibverbs valgrind
support ;)

If you send me your code I may be able to find some time to
investigate too.



More information about the general mailing list