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

Michael Schlenker schlenk at uni-oldenburg.de
Mon May 26 14:21:28 PDT 2008


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



More information about the SLDev mailing list