View Full Version : why just 65% CPU usage during 2. pass??
xDrJx
30th July 2005, 21:17
I've a question and hope that it's none of those a 1000 times answered.
When I backup using GK the XviD first pass (or better VDMod.exe) uses about all available CPU power but the second pass uses everytime just about 65%. Is there a way that avisynth, VDM or whatsoever uses all available CPU power or is there a limitation of some kind??
My XviD settings are max the DXN HT PAL profile allows, I dont use any fancy additional avs filter, just the ones GK offers me at non-advanced AVS window. I've got a 3,0 GHz P4 HT Prescott.
THX forum pplZ!!
CWR03
31st July 2005, 10:34
Use Ctrl+Alt+Del to bring up Task Manager, then right-click the program in question and set it to highest priority. If you do this, make sure you won't need the computer until it's done, because it'll take so much from your system the Task Manager won't want to come up again.
xDrJx
31st July 2005, 10:46
I've already tested that, the idle process takes about 20%, that means that VDMod doesn't want more than 65% CPU power :confused:
I mean, it's not that another process needs the power, it's just not used?!?
jggimi
31st July 2005, 16:14
It appears reasonably obvious to me that VdubMod is not consuming CPU because it is waiting on something else -- most likely I/O. I would look to your HD DMA settings and/or other devices on the same bus.
Moving to PC H/W S/W forum.
xDrJx
31st July 2005, 16:44
Thx all!
I've got a SATA via Raid and a DVD drive via IDE bus, but thats not in use while encoding. It's hard to believe, that the SATA is to slow :confused:
jggimi
31st July 2005, 17:57
H/W RAID or S/W RAID? It is most likely RAID configuration settings ... but it could also be SATA BIOS settings, or driver settings in Windows.
But if you think about what encoding is: 1) read, 2) compute, 3) write, 4) repeat ... can you think of anything else?
I'm betting on an I/O bottleneck, and RAID configuration may certainly be the culprit.
(If you're doing RAID 5, for example, there are a minimum of 3 I/O operations for every write.)
xDrJx
31st July 2005, 19:45
I'm not quite experienced with RAID ect so I'll try to say it as simple as possible (so understand it ;) ),my SATA 160GB Maxtor is just plugged to my mainboard, so I guess it's not realy RAID or at least not how I understand it. There's also no disc array, no second HD. I also don't know how to configure this properly or if there's anything to configure at all.
What I just don't understand is why the idle process keeps about 20% during second pass, I mean XviD should encode using max of the CPU power possible, shouldn't it? And I couldn't imagine this f**** Maxtor is to slow.
Damn, I feel so stupid :angry:
Have to learn now for some exams and get back into this in the next days.
Thx jggimi
Doom9
31st July 2005, 20:02
well.. if you have 65% used by virtual dub and 20% by the idle process.. which process is eating up the remaining 15%?
xDrJx
31st July 2005, 20:35
the values are shifting, its sometimes 65/30, then 75/20, and so are the encoding fps VDMod shows me. But the overall performence is about 65% in second pass. First pass reaches incredible 90% CPU usage. 1-2% takes the taskmanager and so does my firewall, sygate. I did a test with my lan connection, firewall and ati CLI disabled but the idle process still took 20% or better, my CPU did 20% vaccation, that lazy bastard :) Here was it where the 20 % came from I wrote about.
Smile2
1st August 2005, 16:29
on the 2nd pass, do you experience lag when you try to access the HD on Windows Explorer?
xDrJx
2nd August 2005, 11:09
thx pplz
Did some further testing and experienced some minor lags in explorer. VDMod was set to high priority in task manager and used about 65-75%. Most the time everything was smoothly in the explorer, but when I opened a movie during second pass the usage jumped shortly to 100% but then the idle process took back kinda 10-15%. At Realtime setting there a lags, but the idle process still has about 20%. When I look at the CPU Graphs (show both CPU setting) it looks like someone having a heartattack.
Will do some further testing. Maybe its a CPU temp problem, but I did this test fresh on start and the first pass used more CPU power.
Could this be some SP2 problem? Sounds ridiculous, but I installed SP2 some days ago (clean) and this problem never occured to me before, so I think at least
EDIT:
Did some qick 1-pass encoding with NeroVisionExp (avi 2 DVD) and NVE.exe took 95-99% CPU usage, so its possible, why can't GK/VDM/XviD (don't know who to blame) :angry:
EDIT2:
When loading the vob file directly into VDM or NeroVExp and encoding single pass about 50% usage. Reinstalled XviD, no effect. Does anyone with a PreScott HT have 99% CPU usage?
squid_80
2nd August 2005, 12:19
More than likely it's going as fast as possible, but only using one of the virtual cpus provided by HT. You're probably not missing anything.
xDrJx
2nd August 2005, 13:00
Hmm, could be.
Just thought that anything less then 99% isn't full power.
But anyway, last CPU was AMD and atm it looks sure as hell next one will be too :D
squid_80
2nd August 2005, 14:16
You could always disable hyperthreading and see what happens. Don't ask me how to do that though, I'm an AMD guy myself.
xDrJx
2nd August 2005, 15:15
I'll be damned, you solved my puzzle squid_80 ;) eh, just kiddin', but that was it.
I may be no A/V wiz but I can fight my way through a BIOS and disabling HT boosted VDM right up to 99% usage at first and second pass, but unfortunately the decrease in speed was immense!!!! :eek:
HT on:
1pass: ~50 fps
2pass: ~20 fps
HT off:
1pass: ~31 fps
2pass: ~10 fps
Woha!! I guess those 20% for the idle process aren't so bad after all :D
Nice riddle this was :devil:
But if the idle process keeps ~20% with HT on, could it be possible to use this power to support encoding??
Maybe I should try 2 jobs simultaneously ;)
thx guys, all of ya
squid_80
2nd August 2005, 23:39
Thought that might happen. Here's the deal: with HT enabled, you effectively have two cpus which I think each make up 50% of the processor load shown in task manager. Xvid isn't multithreaded so it uses only one cpu, taking the cpu usage up to 50%. The other cpu is used for vdub's input thread (possibly other background windows stuff as well) which will include avisynth, since you're using Gordian Knot. That accounts for the other ~20% cpu usage shown.
The only way you'd get 100% usage with HT on is if your avisynth script used a lot of cpu power, or if xvid was multithreaded... which may not be too far away, considering what's been posted to the development mailing list lately.
xDrJx
3rd August 2005, 13:44
Yeah, but the difference in speed with HT on/off is interesting. One should think with HT off the entire CPU is used as one so no comp cycles are lost unless it has to wait for something, which shouldn't occur at at read-compute-write process with a fast HD. But on the other hand those tests showed me more then otherwise :D
squid_80
3rd August 2005, 14:46
With HT off the single CPU jumps between reading (avisynth's thread) and computing (xvid's thread). With HT on both can be done (virtually) simultaneously. That's the advantage.
xDrJx
3rd August 2005, 14:57
:thanks:
Mr C
11th August 2005, 11:33
Nice discussion :)
I've noticed my CPU isn't using the full 100% neither, but the bottleneck is my memory. When I run perfmon, my memory is allways at the maximum.
... Xvid isn't multithreaded so it uses only one cpu...
Does anyone know which codecs support multithreading?
Thx
Doom9
11th August 2005, 13:29
Does anyone know which codecs support multithreading?the following codecs are smp optimized: x264, libavcodec mpeg-4, divx6 helium, ateme avc high profile (currently in private beta test) - it's not about multithreading, you can have an application with multiple threads that doesn't really profit from multiple cores.. you have to divide the heavy lifting on two threads and give each the same amount of work to do, only then can you take full advancate of having more than one core.
Mr C
16th August 2005, 13:42
... you have to divide the heavy lifting on two threads and give each the same amount of work to do, only then can you take full advancate of having more than one core.
And how does that work? I mean: usually the encoding process is about calculating the difference between frames. So how can one core calculate on a frame that's being handled by the other core? Or how does this SMP work?
Thx for the info. (although it might be slightly off-topic)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.