100% cpu
|
|
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
|
09-18-2005 11:23
Why is SL using 100% of my cpu? I'm running W2K with an AMD 64 3000+ cpu, hardware accelerated sound (Audigy) and PCI-Express graphics (Nvidia Geforce 6800 with 256 mb DDR3 SDRAM) on an NFORCE 4 motherboard with a gigabyte of DDR 400 dual channel SDRAM (Corsair ram, not the cheap stuff.) I've got all the latest drivers, trust me.
Why the *frack* does SL need all those cycles? With accelerated sound, accelerated graphics, physics done server-side?
Stopping SL drops the cpu usage to between 0% and 2%. Running SL PEGS the cpu at 100%. Solid. It never drops below 100%. Wtf?
Does SL peg the cpu like this for everyone? If so, can a Linden who knows the code (not a desk-monkey who'll tell me to clear my cache and update my video drivers) explain what SL is doing with 3 gigahertz of cpu?
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
09-18-2005 11:58
It's perfectly normal, so don't worry. SL will ALWAYS use whatever processing power is available to it. If you've got nothing else running, then it will use 100%, minus whatever your OS is consuming. If you've also got Photoshop running, then SL will use 100%, minus whatever Photoshop and your OS are using. SL just picks up whatever resources are not being used by other applications so that it can run as smoothly as possible. It's really not a big deal.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
|
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
|
hmmm
09-18-2005 12:11
When I scroll webpages in a browser while running SL in a window, SL sound jumps and jitters as SL competes with the browser for cycles.
Looking at the "Processes" chart in W2K Task manager as I'm doing this does seem to show that SL's CPU usage drops as the browser cpu usage increases. This suggests that either W2K's process scheduler is giving priority to the browser, or that the two are competing and SL is losing. I'm not an expert on process scheduling. I do know that when I increased the process priority of secondlife.exe to HIGH, the browser ran slower and SL didn't glitch. This suggests that either my system is not powerful enough to handle SL and a browser at the same time (not bloody likely) or that one of the two processes is a cycle hog.
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
|
|
Emma Soyinka
Got moo? o_o
Join date: 13 Sep 2005
Posts: 218
|
09-18-2005 12:20
Games generally operate by using as much CPU as possible, usually capped by your monitor's refresh rate assuming the devteam was smart enough to turn on wait for vertical refresh. The general MO is to enter an infinite loop until program termination where every cycle through it catches your input and updates the screen and such.
So it's normal, especially since SL is a big resource hog and kinda slow, this means that everything else is slower too because SL's cycles take more processing time, leaving less for other programs to infringe upon. After all if it's running at 15 frames per second it's constantly cycling, whereas if it was a faster program and running at 200 frames per second, there'd be a lot of thread sleep time where it wasn't using your computer resources at all as it was waiting to fill your monitors refresh rate in frames.
Basically, I'm pretty sure there's nothing you can do, and I'm saying that as someone who's developed games herself. Short of badgering LL to make Havok 2 faster so it'll run at above your refresh rate. ^^;
|
|
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
|
thanks, but I dont buy it
09-18-2005 12:29
I'm running an LCD monitor with the refresh rate capped at 60 Hz. The idea that my monitor refresh rate should affect process scheduling or cpu cycles available to an application is interesting. Especially in an age of hardware accelerated graphics. Is SL ignoring my hardware accelerated graphics card and doing graphics in "software", like we did in 1996 before hardware accelerated graphics? SL uses OpenGL as it's graphics API, so I find the idea of the graphics being cpu-bound a bit far-fetched. Not outside the range of possibility, I suppose, but unlikely.
I agree with you that SL is a "big resource hog and slow." I'd just like to know why. I'm not an expert on threads and thread priority, but I suspect you may be near to hittin the nail, there. I understand that SL is not very (if at all) multi-threaded. Doesn't the network code and the graphics code operate in a single thread? Lindens, can you confirm or deny this? Does anyone know a good profiling program I can use to determine SL's thread usage?
The idea that physics has -anything- to do with it, I reject outright. SL physics is done server-side. Sorry.
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
09-18-2005 12:35
From: paulie Femto Except that when I scroll webpages in a browser while running SL in a window, SL sound jumps and jitters as SL competes with the browser for cycles. For gosh sakes, that suxxors. Okay, that is a problem, but it's not one I've ever heard of before. My system's about comparable to yours, and I almost always have Photoshop, Illustrator, and multiple browser windows running at the same time as SL without any problems. I don't think the CPU cycles are your problem. I'd be willing to be it's a driver issue. From: paulie Femto So, SL isn't just "using what's free." SL apparently wants it all, all the time. It shouldn't. Like I said, I'm not sure exactly what the problem is, but I don't think it's a CPU issue. From: paulie Femto Can you suggest a good profiling tool that I can use to determine what CPU percentage individual apps are using? The only one I know of is
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
09-18-2005 12:36
From: paulie Femto Except that when I scroll webpages in a browser while running SL in a window, SL sound jumps and jitters as SL competes with the browser for cycles. For gosh sakes, that suxxors. Okay, that is a problem, but it's not one I've ever heard of before. My system's about comparable to yours, and I almost always have Photoshop, Illustrator, and multiple browser windows running at the same time as SL without any problems. I don't think the CPU cycles are your problem. I'd be willing to be it's a driver issue. From: paulie Femto So, SL isn't just "using what's free." SL apparently wants it all, all the time. It shouldn't. Like I said, I'm not sure exactly what the problem is, but I don't think it's a CPU issue. From: paulie Femto Can you suggest a good profiling tool that I can use to determine what CPU percentage individual apps are using? The only one I know of is FreeMeter, which, contrary to it's name, is not actually free (unless you get the crappy version). It's like 20 bucks.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
|
Foolish Frost
Grand Technomancer
Join date: 7 Mar 2005
Posts: 1,433
|
09-18-2005 12:47
Well, i can answer ONE question as to why windows games are built to use 100% CPU all the time:
The swap file.
Yup, programs that are seen as idle can be swapped out of memory, in part or in whole. When that happens, you get the momentary pause you see when you tell a program to do something or use a function that you have not requested in a while. One of the methods used to prevent that is to make hte program use 100% of all system resources so that windows feels it has to keep the program in memory at all times.
Otherwise, you would get a choppy effects as program and data were sent to the hard drive swap because photoshop wanted active memory.
Did that help to explain?
|
|
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
|
hmmm
09-18-2005 13:08
Sounds reasonable. That could very well be an explanation for why SL cpu usage stays at 100%. If that's the case, is SL misreporting its cpu usage to the W2K scheduler? Is that kind of "fake" possible? Or is SL running a "work as hard as I can" loop, wasting cycles to keep it's cpu usage at the top? Or is it like the "system idle" process in W2K that reports 98 cpu when nothing else is running? I have a problem relating that explanation to my performance degradation, though. SL isnt using a gigabyte of memory (it does appear to use a whopping 215 mb when the AV is just standing around, though) and I'm not trying to do something I havent done for awhile. Perhaps i'm misunderstanding the information being presented in the W2K Task Manager. I will research that window and attempt to get a clearer picture of what I'm seeing. I've also downloaded pslist, a utility that shows thread usage and other statistics. i'm gonna play with that. 
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
|
|
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
|
turned down settings
09-18-2005 13:36
I turned down all the graphics settings and tried running both fullscreen and windowed. Memory usage drops tremendously when turning all the eyecandy off. W2K reported cpu usage (in the "Performance" tab of Task Manager) continues to show cpu usage pegged at 100%.
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
|
|
Morgan Albion
Shutterbug & Bench Warmer
Join date: 4 Jul 2005
Posts: 22
|
09-18-2005 13:50
FWIW, SL will use anywhere between 70 and 100 percent of my CPU cycles running in the foreground on a 1.5 GHz PowerBook (OS X machine). When SL's window is minimized and some other application is in the foreground, SL's process may use around 50-60 percent of the CPU cycles.
SL is definitely a pig, but I've found I am able to browse the web, Skype, stream music from my local machine to my land (pick two of three) and still have SL running, at least if I have my draw distance set low.
Enjoy.
|
|
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
|
ok
09-18-2005 14:03
The cpu usage does drop when the SL client is minimized. From what I've been reading on gamedev.net, 100% cpu usage is normal for an OpenGL game that has system focus with nothing else running. And when I run MAME and SL side by side, the cpu usage appears to be split between them. So, I think I'm makin noise for nothin, here.
I wouldnt even even have started looking into the situation if I hadnt experienced performance problems when running SL and Firefox side by side. Perhaps I need to look elsewhere for answers to my issue. Thanks to all who tried to slap some sense into me.
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
|
|
Foolish Frost
Grand Technomancer
Join date: 7 Mar 2005
Posts: 1,433
|
09-18-2005 15:54
I think your problem might be from having the firefox window partially over the SL window, with part of SL still showing?
That always seems to cause glitches with system reaction timing. I think that SL has trouble trying to refresh a partially obscured screen for some reason. Have no idea why...
|
|
Emma Soyinka
Got moo? o_o
Join date: 13 Sep 2005
Posts: 218
|
09-18-2005 16:10
From my experience as a games developer, again... The reason why SL's CPU hogging would decrease when minimized is because it isn't actually drawing anything, because it is minimized. I've seen this happen before and I'm not sure why the OS would be so smart, but apparantly it is. It's been so bad that in some of my light load games minimizing needed a hack so it wouldn't start churning more CPU cycles from needlessly trying to flip background and foreground surfaces than my computer could handle, making everything slow and stuttery. (that last bit was a bit technical, just ignore it) Anyway since it isn't actually drawing anything the framerate will shoot up way over the vertical refresh rate of your monitor. This means it only processes things 60 or 70 or so times per second, and leaves the thread idle, sleeping, for the rest of the time, which causes an increase in CPU cycles available. Again I state I honestly believe there is nothing that can be done for SL without making it even slower. To get the cycles back that the thread is using on graphical operations - doesn't matter if this is done by software or hardware AFAIK the thread is still live while waiting for them to finish - you would have to artificially add "idle time" into the SL thread, which means even less frames per second rendered than normal, but more spare CPU cycles for other programs. And I'm sure most people would agree that SL is too low on FPS as it is.  EDIT: Lowering the priority for SL's process might free up CPU cycles for other things. It might also spectacularly blow things up, but hey, that's a risk you gotta take. ^^;
|