[sldev] [PATCH] possible getCurrentRSS() hang/slowdown on OS X?

Barney Boomslang bboomslang at googlemail.com
Fri May 30 14:49:54 PDT 2008


Man, I could kiss you for that! Those weird freaky freezes drove me crazy -
I can reproduce them quite reliably at the sim Avaria Kro in the grendel's
builder box - I guess that something in that sim triggers the memory
fragmentation that makes getCurrentRSS so hellishly slow. Removing that call
and those freezes are gone for good. yay!
bye, Barney

On Mon, May 26, 2008 at 11:21 PM, Michael Schlenker <
schlenk at uni-oldenburg.de> wrote:

> Hi,
>
> i compiled the recent OS X releases and release candidates on my Mac Book
> Pro and noticed
> periodic slowdowns (about every ten minutes a hang of around 10 seconds or
> so).
>
> Looking at the debug console output i noticed its sending statistics at
> that time, so i
> stepped into llviewerstats.cpp send_stats() which seemed to take all the
> time.
>
> When stepping over with gdb it showed that getCurrentRSS() took 99% of the
> time time for
> the whole routine (about 10seconds), but the actual getCurrentRSS() code in
> llmemory.cpp
> is really fast in isolation (even with 4 GB memory on this Mac Book Pro).
>
> So i patched out the call in send_stats() and do not longer notice these
> specific periodic
> slowdowns on OS X, others still there...
>
> (in llviererstats.cpp around line 692)
>
>        agent["agents_in_view"] = LLVOAvatar::sNumVisibleAvatars;
>        agent["ping"] = gAvgSimPing;
>        agent["meters_traveled"] = gAgent.getDistanceTraveled();
>        agent["regions_visited"] = gAgent.getRegionsVisited();
>        // agent["mem_use"] = getCurrentRSS() / 1024.0;
>        agent["mem_use"] = 100.0;
>
>        LLSD &system = body["system"];
>
> Can anyone confirm:
> a) getCurrentRSS() is really slow inside the SL viewer
> b) removing the getCurrentRSS() call fixes the 10-minute periodic hang?
>
> Greetings,
>    Michael
>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> /index.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20080530/440b04c7/attachment.htm


More information about the SLDev mailing list