VOGONS


DOSBox performance on Mac OS X

Topic actions

Reply 20 of 51, by CommanderKeen

User metadata
Rank Newbie
Rank
Newbie

When DOSBox 0.73 isn't doing anything at all, just being open, it uses around 50% of my CPU... (I'm the guy with the old PowerBook G4 from some replies above)... Still, it's using 50% of my 1.5 GHz processor... that's kinda much. Anyways, this happens with official/my own builds of 0.72 & 0.73.

Reply 21 of 51, by robertmo

User metadata
Rank l33t++
Rank
l33t++

can you check older dosbox versions - i wonder whether it was ever better in the past.

Reply 22 of 51, by Zorbid

User metadata
Rank Member
Rank
Member

On Intel I went as far as possible without compiling builds myself, ie down to 0.70. Previous binaries are PPC only.

Reply 23 of 51, by CommanderKeen

User metadata
Rank Newbie
Rank
Newbie

I tested 0.65, that was the oldest already compiled version I could find. This version is PowerPC only, in theory, this would probably make it even faster for me because it doesn't have the unused Intel code. But in theory it also would have with my own builds on which it didn't.

Anyway, DOSBox 0.65 uses 25-30% CPU while not doing something. This is almost half the CPU of 0.73. It also uses around 50 mb RAM and 830 virtual memory for those who are interested.

I'll compile other versions pre 0.65 and see what that does.. Any suggestions on which I should try first? or are there older already compiled binaries?

Reply 24 of 51, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie
CommanderKeen wrote:

I'll compile other versions pre 0.65 and see what that does.. Any suggestions on which I should try first? or are there older already compiled binaries?

In the past there existed Mac frontends which includes 0.63:

Petit DOSBox

Radnor (both are still downloadable)

They never has been updated even to 0.65 and its changed config file format, so I did my own frontend programming.

Klimawandel.

Reply 25 of 51, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well in idle mode dosbox does take more resources in recent versions compared to ancient versions.
this is simply because how the timing and keyinput was changed. It shouldn't affect action based games. only the idle mode. (so text adventures might fall in that group)

Water flows down the stream
How to ask questions the smart way!

Reply 26 of 51, by CommanderKeen

User metadata
Rank Newbie
Rank
Newbie

So what do you suggest to run in DOSBox so it isn't idle and still pretty consistent ?

I'll try to compile 0.50 & 0.60 for my Mac (if they won't compile, I'll try other versions) First I'll have to see which version of SDL I need to use...

EDIT: I can't seem to open the .tar.gz files. This has never happened to me, both OS X' Archive Utility and Stuffit stop because they can't open the .tar file. Tried with 0.50, 0.60 & 0.73. Did you guys change something?

Reply 27 of 51, by frobme

User metadata
Rank Member
Rank
Member

Just for reference, I ran the stock .73 build on a brand new Macbook Pro 2.8Ghz (in Nvidia 9800M mode).

CPU usage averages around 28.5%, sitting at the initial prompt and with no changes to the default config. Reserved memory size is 50MB (just taken from top running in a terminal).

I rebooted the same machine into Windows XP via boot camp, and according to Task Manager, sitting at the prompt Dosbox uses no appreciable CPU (0%), and about the same memory (44MB).

This is a new laptop, so I'll see about getting the dev tools installed and download/build the latest bundle myself to see what's going on.

-Frob

Reply 28 of 51, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

So what if you increase frameskip???

1+1=10

Reply 29 of 51, by robertmo

User metadata
Rank l33t++
Rank
l33t++

I think you should try to run a more demanding game to eliminate the possible idle state Qbix mentioned. On my windows (phenom4core) whatever game i run with 3000 cycles CPU usage is 0%.

Reply 30 of 51, by CommanderKeen

User metadata
Rank Newbie
Rank
Newbie

Ok, I'll try Quake or something like that.

Still haven't got the source codes... This time, sourceforge has an error saying that the page is unavailable (not just the DOSBox downloads page but the whole site). Probably I downloaded corrupted .tar.gz files yesterday and that's why they won't open.

I don't have an Intel Mac so I can't boot into Windows and see the other results like frobme

so I'll see about getting the dev tools installed and download/build the latest bundle myself to see what's going on.

If you need help compiling, ask me, I know how to do it on Mac. The resources on how to do it are a bit out-dated or incomplete. Unless you know how to do it yourself.

Anyway, I can't test older versions without the sourcecodes so I'll have to wait till sourceforge is back or when someone has an alternative link to it.

Reply 31 of 51, by Zorbid

User metadata
Rank Member
Rank
Member

With 1 clyle and framskip at 10, it still uses 15% of one core (instead of ~33%-34%).
Cycles contribute to ~12% of the drop.

If I launch Prince of Persia (3000 Cycles, 0 or 1 frame skipped), the CPU share climbs to 35-40% during the intro (the Adlib synthesis, I guess) then, ingame, it drops to the ~33-34% baseline. Same pattern in 0.72, except that the old OPL Synth is more CPU demanding (it raises to 40-45% instead of 35-40%).

You can do some raw profinling from the task manager. Please find below:
0.73 idling at the prompt
0.73 During PoP intro with music
0.73 with PoP loaded, in game, doing nothing.

Edit : In Windows XP under virtualisation (parallels), DOSBox uses ~7-10% of the reported CPU time for the three conditions.

Reply 32 of 51, by robertmo

User metadata
Rank l33t++
Rank
l33t++
Zorbid wrote:

(the Adlib synthesis, I guess)

You can check that by disabling adlib in dosbox.conf or in game's conf or switching to midi/speaker

Reply 33 of 51, by Zorbid

User metadata
Rank Member
Rank
Member

I've tried to disable everything in the config file, but the baseline CPU usage rose... I didn't go further down that path (but we may have to in the future).

Reply 34 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

on my imac Dosbox idles at 18-19% CPU usage. If I start the program dosidle.exe then CPU usage drops to 13-13.5%...
(dosidle can be easily found via google)

Reply 35 of 51, by CommanderKeen

User metadata
Rank Newbie
Rank
Newbie

Which iMac? (Intel or PowerPc?) anyway, I'll try to open the .tar.gz files today, if it doesn't work here I'll try on some other computer..

Reply 37 of 51, by CommanderKeen

User metadata
Rank Newbie
Rank
Newbie

Ah okay, it might have been a G3 PowerPC one and that would use the G3 custom binary. I have an iMac G3 somewhere, I could test the G3 only binary and see if it has any difference.

Reply 38 of 51, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Interestingly the CPU usage does not really drop when you set priority=higher,paused in the conf and you minimize Dosbox. It does drop about 0.5% to 1% only.
EDIT: Of course it didn't drop, since it is supposed to be "pause" not "paused" 😀
With pause the CPU usage does drop to about 3%

Different outputs have no impact on this. Surface and OpenGL have the same idle CPU usage, Overlay uses about 2-3% more.

When I run the PCPbench(mark) I get around 90% usage.
Don't know if these informations help anyone, but I'm willing to do more tests if aynone wants to have something tested...

Edit: Curiosly I just did my first self compilation of the current CVS on Mac and I get 30% CPU usage... Who is the official OS X version maintainer? I think I need to learn how to optimize this somehow... I'd also like to know how to make the app bundle...

Reply 39 of 51, by CommanderKeen

User metadata
Rank Newbie
Rank
Newbie

Dominus, I know how to make you a static SDL (if you haven't already) and how to have it like in the release (with an icon etc.). I don't know how to cross compile for PowerPC/Intel (I've made a message about it but nobody answered it). And I also don't know how to optimize it. If you want details, sent a pm or something like that because otherwise it's rather off-topic.