HELP! OpenMPT increases my processingpower!!!!!!! (I think)

Started by Waxhead, July 14, 2007, 16:11:17

Previous topic - Next topic

Waxhead

This may sound INSANE but when I'm running OpenMPT i experience something rather strange.
I code a bit every now and then and have written a tool who does some processing and sends this information to a 3D viewer. The strange thing is that when OpenMPT runs in the background playing some music both my program and the 3d viewer (who a friend of mine wrote) is running A LOT FASTER!!!!!!

This sounds totally bananas but it's true - honest! - So I would like to ask one of the developers what the heck they did in the code!

PS! I'm running a E6600 Core 2 duo processor with 2gigs of ram with XP SP2. The only thing I can imagine is that this is related to some screenupdate / refresh or something simmilar. Even if I tick off follow song it still speeds up. Any details on what is making OpenMPT a CPU turbocharger would be appreciated

seventhson

Isn't that because dual core is optimized to run multiple programs at the same time?

LPChip

It almost sounds that the guy that programmed the viewer made somekind of bug, or syncing it to an audio buffer or so...

I guess the reason this is happening means that that viewer could be faster if he'd remove this bug.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Waxhead

The viewer is based on OGRE (it's written in pure basic (sigh)) but it works ;) - My own program (written in C) is also speeding up a bit....  The only thing I can think of is that OpenMPT somehow magically increases the response time of network sockets  ::)

Relabsoluness

Quote from: "Waxhead"The strange thing is that when OpenMPT runs in the background playing some music both my program and the 3d viewer (who a friend of mine wrote) is running A LOT FASTER!!!!!!
What an outrageous bug in OpenMPT - this must be fixed  :P

LPChip

Quote from: "Relabsoluness"
Quote from: "Waxhead"The strange thing is that when OpenMPT runs in the background playing some music both my program and the 3d viewer (who a friend of mine wrote) is running A LOT FASTER!!!!!!
What an outrageous bug in OpenMPT - this must be fixed  :P

Hahahaha ROFLMAOBBQ :nuts:
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Waxhead

Ultra-LOL :P , hehe perhaps some of the devs can explain what can cause this hehe

Sam_Zen

Some vague considerations :
3D images have to be rendered on the spot and take a lot of processing power and of the video card.
If this has priority in the procedure, then OMPT gets in a kind of waiting queue to get some memory access once in a while.
So maybe OMPT is desperately trying to catch up with things on the screen.
0.618033988

Waxhead

OpenMPT runs fine. No jerkiness whatsoever, also the other apps does not use all available CPU time (nor do they spend much time in kernel time).
So there is a reason that running 3 apps is "faster" than running 2. It must be some kind of signaling who makes my apps go faster. So I would really like to hear from one or two devs what actually happens when OpenMPT starts playing music and scrolling it's window.

SoundCrafter

Quote from: "Seventhson"Isn't that because dual core is optimized to run multiple programs at the same time?

He's right, I believe. I don't think this phenomenon would occur on a single-core proc (Although I'd LOVE to see it on a quad-core!)

I'm not familiar with the E6600. Does that have HT and what's the core speed on it? Is it Core 2 Duo or Extreme?
---Formerly known as ---DjBj---. changed names for lots of reasons.
BooT-SectoR-ViruZ is the new Skaven and the whole world'z goin' to Hell.
Lowpass filter! Perform a generic type of dodge!!! :lol:
Everyone should get on this forum's chatroom RIGHT NOW...still not sure why, though.

Waxhead

This has nothing to do with the processor. (especially since I have disabled speedstep and other boring things).

Think of the CPU as a motor (a dual core as two motors). If the applications are load for these motors there is no motor in the world who goes faster with more load.

Two loads balanced over two processors will run faster than the same load on one processor. Three applications runs slower than two no matter what. This are the reason I'm curious about this. It must have something to do with some signaling to the OS. I just want to know what ;)

älskling

It's probably just two wrongs making a right for once.

dBlues

Sounds like the CPU load calculation was faulty. I really cannot think of anything else, except that Microsoft might have a conspiracy with Intel/Duron. They planted in a new "feature" which slows new machines down to sell more powerful processors. MPT is currently breaking this feature. So you better file in a bug report to M$...
Strive for excellence, not perfection.

Sulik

If your application is limited by the OS scheduling period, it may be due to multimedia timer functions in MPT lowering the scheduling period (and/or generating more events allowing for more fine-grained context-switching).
It's specially likely if your application contains calls to Sleep(1).
You can experiment by calling timeBeginPeriod(1) in your app to see if you get similar results.

Waxhead

Quote from: "Sulik"If your application is limited by the OS scheduling period, it may be due to multimedia timer functions in MPT lowering the scheduling period (and/or generating more events allowing for more fine-grained context-switching).
It's specially likely if your application contains calls to Sleep(1).
You can experiment by calling timeBeginPeriod(1) in your app to see if you get similar results.

I actually do a Sleep(50); in my mainloop and I got another thread waiting for data over the network. But thanks for the tip ;)