< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] resiprocate stack memeory leak?????


Most OSes do not reclaim unused memory from a process until some other process needs it. So, unless there is not enough memory to go around, that 400MB figure won't drop, even if there is no traffic. However, If your memory is not reaching a steady-state under load, you should look through the logs for output from RESIP:STATISTICS, after you have stopped throwing traffic. This will report the current size of the important data structures in the stack (such as the maps of TransactionStates, the current size of the TimerQueue, and the number of messages waiting in the mStateMachineFifo). One of these logs is written once a minute, so you should have a pretty good idea of how much memory is being used by what at any given time. Please reply with what you find.

As for your questions about AbstractFifo, I am unsure why mSize is needed. Can anyone answer this (or, answer why clear is a no-op)?

Best regards,
Byron Campen

Hi All,

I used svn to get the latest resip stack on Aug. 4, 2006 and build a
simple applications.
If the call rate is 20 per second, there is no memory leak (the memory
status stable) and stay about 200 mega bytes.
If the calls rate is 100 to 200 per second, the memory usage increases
dramatically from 200 megabytes to about 400 megabytes for 2 hour durations. The memory usage will not go down even after the call generator stopped
for more than 4 hours.

So valgrind is used to monitor the memory leak, and it did not show any.

 resiprocate stack must hold the memory.

I try to use the size of mStateMachineFifo to control the number of
incoming sip  request msg if the size exceeds certain limit, but the
size may get wrong size of NoSize defined by AbstractFifo.hxx when clear
func is called.

My question about  rutil/AbstractFifo.hxx:
since std::deque mFifo is defined, there is no need to define mSize
since the size of msg can get from mFifo.size().
     Why mSize is assigned NoSize which is 0U-1 when func clear is
called.  mSize should be 0 fro this case.
     So mStateMachineFifo.size cannot be trusted since it can be 0U-1
even if the mFifo is empty after clear() is called.

--
Thanks

Frank Yuan


_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel

Attachment: smime.p7s
Description: S/MIME cryptographic signature