Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2025-08-12 06:17:33



Reply to topic  [ 4 posts ] 
High CPU usage 
Author Message

Joined: 2010-04-30 23:14:32
Posts: 24
Reply with quote
Some time in the recent past, CPU usage has gone through the roof. Unfortunately I can't say with absolute certainty which version saw the change because it only affects one aspect of gameplay that only occurs two or three times a week.

I'm a DJ, and for a few hours each week I stream music to a couple of clubs inworld. I am able to run IDJC in one window to play the music and SL in another window to interact with the audience, and up until recently it has been working great. But just recently there have been complaints that the sound skips sometimes, and now that I listen more closely I can hear it on my end too as it leaves my PC... frequent "hiccups" where the audio is delayed for a fraction of a second. So I pulled up top and saw that the do-not-run-directly binary stays at or even above 100% cpu usage almost constantly. It might dip down as low as 40% for a few moments but then it's back up at the top again. All I know is, it wasn't doing this before. A couple months ago, I could run two, even three instances of SL and they would play nicely, rarely going above 20% each. Now just IDJC and one instance of SL are enough to overtax my system.

I run Arch Linux currently on kernel 2.6.36 with a minimal footprint window manager (fluxbox). Hardware is AMD Athlon II dual core 3.0Ghz, 8 GB RAM (64-bit kernel to make full use of the memory), and nVidia GeForce 9500 GT. I can get almost 100fps even with all the bells and whistles turned on in a quiet sim, and 30-40fps in a crowded sim with lots of scripts running. So there is *no* reason my CPU should be working this hard!

Any suggestions on what I can look for to tweak so it plays nicely, or do you need more information?


2010-12-14 17:10:17
Profile

Joined: 2009-03-17 18:42:51
Posts: 6030
Reply with quote
While its window is focused, the viewer always uses 100% of *one* CPU core (and only about 30% as soon as the browser window looses its focus since the viewer then voluntarily reduces its frame rate), plus a few percents of a second core (when present) for texture decoding (which only occurs when objects or avatars are rezzing). If you wish to concentrate all the load on a single core, then go to the advanced menu and uncheck the "Run Multiple Threads" option.

Note also that with Snowglobe (on which the Cool VL Viewer v1.25 is based) and viewer 2, the media are now played via a SLPlugin thread (with one thread launched for each played media, the parcel streaming music excepted). When such media are web pages (including the built-in web browsers existing in avatar profiles and the Search floater, for example), the SLPlugin uses a QTwebkit browser which, alas, got the extremely annoying characteristic to eat up 100% of a CPU core power under Linux (Windows doesn't seem affected). To prevent this high CPU usage to slow down the viewer or other running processes, the Cool VL Viewer automatically gives the lowest priority (nice 19) to the SLPlugin process: alas, this might not be enough if your CPU is already loaded by other processes which may in turn see their share of the CPU reduced.

My advice is then: when streaming music, un-check "Run Multiple Threads" in the Advanced menu and make sure to close any floater with built-in web browsers when you don't need them (for the Search floater, do destroy the floater by closing it with the X icon in the upper right corner of the window since toggling the floater visibility won't destroy it and its four associated built-in browsers would keep up eating up CPU power uselessly).


2010-12-14 19:27:49
Profile WWW

Joined: 2010-04-30 23:14:32
Posts: 24
Reply with quote
Ah, that gives me some things to try. Thanks! But just to clarify, I don't mean streaming music within the game; I mean I use idjc to stream music from my pc to an external server. While doing that, I do not attempt to listen to any music or other sounds in-world.


2010-12-14 22:50:59
Profile

Joined: 2009-03-17 18:42:51
Posts: 6030
Reply with quote
SegmentationFault wrote:
Ah, that gives me some things to try. Thanks! But just to clarify, I don't mean streaming music within the game; I mean I use idjc to stream music from my pc to an external server. While doing that, I do not attempt to listen to any music or other sounds in-world.
I perfectly understood. What I was trying to explain to you is that if, for some reason, both of your cores get loaded at 100%, then your streaming software can get insufficient CPU power to stream without interruption.


2010-12-14 23:15:27
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.