Really high CPU usage in ZSNES 1.42 Linux!?
Moderator: ZSNES Mods
-
- Rookie
- Posts: 27
- Joined: Sun Dec 26, 2004 9:07 am
Really high CPU usage in ZSNES 1.42 Linux!?
Is it just me, or is ZSNES being a CPU hog on my VIA C3 running Gentoo Linux? Because ZSNES consistently gets 40+fps with 512x448 resolution, no filters and 60%CPU (X takes up the other 30% or so), while my Athlon 1800+ does the same thing with 1% CPU, running Windows XP. Not exactly a fair comparison, but I would like to know if this is Linux's fault or VIA's fault.
You all know Gentoo, it's a source distro, my CFLAGS are -Os -march=c3 -m3dnow -mmmx. Except that that won't really help, because ZSNES is all assembly for x86, right?
EDIT: just in case somebody points out that my Athlon is really really good like that, a Pentium II Celeron 433MHz (win98) gave better frame rates than this VIA C3 at 933MHz.
You all know Gentoo, it's a source distro, my CFLAGS are -Os -march=c3 -m3dnow -mmmx. Except that that won't really help, because ZSNES is all assembly for x86, right?
EDIT: just in case somebody points out that my Athlon is really really good like that, a Pentium II Celeron 433MHz (win98) gave better frame rates than this VIA C3 at 933MHz.
-
- Dark Wind
- Posts: 1271
- Joined: Thu Jul 29, 2004 8:58 pm
- Location: Texas
- Contact:
-
- Rookie
- Posts: 27
- Joined: Sun Dec 26, 2004 9:07 am
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
DRI makes a difference for OGL modes. Also try CVS, the Linux port has better CPU handling.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Rookie
- Posts: 27
- Joined: Sun Dec 26, 2004 9:07 am
OK, now that i enabled Direct Rendering, performance is up by 6 fps. Before: 29fps on Star Ocean Software Rendering, Now: 35fps on OGL. Enabling anything else, like the bilinear filter, drops frames drastically. Man I thought 3D chips were supposed to take care of bilinear filtering like icing on a cake! Who knows what kind of perf I'll get when I tell it to do Trilinear!
Is there anything else I can do to speed it up? I'm really reluctant to try the CVS, to be honest. I already have enlightenment-0.17 CVS and xorg-x11 CVS on the computer, I don't want to waste more time on CVS -d:pserver and stuff. Besides, I don't know how to uninstall it once I install it separately from Gentoo's emerge command!
Would 3dNow help? How can i find if it's compiled in already?
EDIT: just for curiosity's sake, what CPU usage do you guys have on Linux using which graphics rendering method (OGL, software)? Because the writer of ZDOOM said that X11 really sucked for games on his website... so I wonder if this kind of performance is considered acceptable on Linux.
Is there anything else I can do to speed it up? I'm really reluctant to try the CVS, to be honest. I already have enlightenment-0.17 CVS and xorg-x11 CVS on the computer, I don't want to waste more time on CVS -d:pserver and stuff. Besides, I don't know how to uninstall it once I install it separately from Gentoo's emerge command!
Would 3dNow help? How can i find if it's compiled in already?
EDIT: just for curiosity's sake, what CPU usage do you guys have on Linux using which graphics rendering method (OGL, software)? Because the writer of ZDOOM said that X11 really sucked for games on his website... so I wonder if this kind of performance is considered acceptable on Linux.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Delete source. Delete executable. BAMkyo-KUSANAGI wrote:Besides, I don't know how to uninstall it once I install it separately from Gentoo's emerge command!
P4 1.8GHz 448MB RAM, mode 1024x768 ODS Fjust for curiosity's sake, what CPU usage do you guys have on Linux using which graphics rendering method (OGL, software)? Because the writer of ZDOOM said that X11 really sucked for games on his website... so I wonder if this kind of performance is considered acceptable on Linux.
-> max cpu usage 10% with only bilinear filter on, autoframeskip + max frameskip 0
[max is 85% with bilinear + hq2x, autoframeskip + max frameskip 9]
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Rookie
- Posts: 27
- Joined: Sun Dec 26, 2004 9:07 am
Right, I know how to uninstall now (hey don't blame me Windows has all that registry stuff to clean!)P4 1.8GHz 448MB RAM, mode 1024x768 ODS F
-> max cpu usage 10% with only bilinear filter on, autoframeskip + max frameskip 0
[max is 85% with bilinear + hq2x, autoframeskip + max frameskip 9]
96.9% with ODR 512x448, no other filters, autoframeskip + max frameskip 9. Sound 44KHz.
You know, a very interesting thing is, whenever I start zsnes, it just uses all the CPU. Like, before I've loaded a ROM, and I'm just at the GUI, bam! It uses all my CPU, just by running the program. The difference now with direct rendering is, my mouse moves smoother than the software rendering method inside the GUI, but zsnes still uses all the CPU.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Hmm... sounds like you don't have the version in which we fixed that.kyo-KUSANAGI wrote:96.9% with ODR 512x448, no other filters, autoframeskip + max frameskip 9. Sound 44KHz.
You know, a very interesting thing is, whenever I start zsnes, it just uses all the CPU. Like, before I've loaded a ROM, and I'm just at the GUI, bam! It uses all my CPU, just by running the program. The difference now with direct rendering is, my mouse moves smoother than the software rendering method inside the GUI, but zsnes still uses all the CPU.
Just checked - yeah, we fixed that in post v1.42 WIPs.
Grab cvs...
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Dark Wind
- Posts: 1271
- Joined: Thu Jul 29, 2004 8:58 pm
- Location: Texas
- Contact:
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
I direct you to read the first thread on the forum.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Rookie
- Posts: 27
- Joined: Sun Dec 26, 2004 9:07 am
Odd..... I put zsnes in my xinitrc, so now it's the only X program running.
With software 512x448, idle, no ROM loaded, zsnes takes up 85% or so of my CPU.
With OpenGL 512x448, idle, no ROM loaded, zsnes takes up only around 1% CPU. Oddly enough, it wouldn't let go of the CPU when I ran it in XFCE even in OpenGL mode.
However, frame rates have not improved. 45fps on the Tales of Phantasia world map, and the same for the Star Ocean title screen too. Is there no way to speed this up further?
With software 512x448, idle, no ROM loaded, zsnes takes up 85% or so of my CPU.
With OpenGL 512x448, idle, no ROM loaded, zsnes takes up only around 1% CPU. Oddly enough, it wouldn't let go of the CPU when I ran it in XFCE even in OpenGL mode.
However, frame rates have not improved. 45fps on the Tales of Phantasia world map, and the same for the Star Ocean title screen too. Is there no way to speed this up further?
-
- Born to Rule... Impatiently
- Posts: 265
- Joined: Wed Nov 17, 2004 8:21 pm
- Location: Everywhere I want to be.
- Contact:
From the FAQ:
Perhaps we could have this info stickied somewhere...
Code: Select all
Q: Why is ZSNES slow?
A: Try changing your video mode to different settings until you find the mode
that's optimal in performance. There are two things that will probably impact
speed the most (for the better): using a fullscreen setting (instead of a
'windowed' mode) and a resolution lower than that of your desktop. The lower
the display resolution used in ZSNES, the better the overall performance will
be, due to lesser processing requirements. 'R' modes are also faster than 'S'
modes because they maintain the original display ratio rather than stretching
it to fill the monitor's current resolution.
Ensure that MMX Support is enabled in the Options window; this mode should
provide a noticeable speed increase for computers that can use it.
Emulating a SNES is slow because it is a complex system. Also, make sure that
you meet the system requirements.
Vsync, by nature of syncing to the monitor, is also slower. So if speed is
paramount to you, Vsync should be disabled. You should also disable all
interpolation and graphic filters, and use auto frame rate and frame skip. If
you still need more speed, disable sound. Then, if that's not enough, disable
SPC emulation (you must exit and reopen ZSNES for the option to take effect);
this will cause some games to not work, though.
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.
"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
In other words sticky the entire FAQ...
I don't like that idea. Having the FAQ someplace online though would make sense.
I don't like that idea. Having the FAQ someplace online though would make sense.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Very slow on Mepis
I'm also having a problem of poor performance in SimplyMepis 3.3 (based on Debian Gnu/Linux) that may be related (using kernel 2.4.29). Haven't checked CPU usage but I suspect it's high. Zsnes (v 1.40, I think) worked great on same system in Mepis 2004-4, in many two-palyer games, full-screen, with good sound, two USB gamepads and default options, now, after Mepis upgrade, even using mouse in Zsnes is painfully slow and games run slow with very choppy sound. System has an old PII-266MHz, 192MB RAM, Nvidia Geforce FX 5200 (128MB). Same issue in Debian binary v. 1.40 and in compiled 1.42 and 1.43 WIPs (used autogen.sh, everything looked good to me, had all dependencies from Debian testing/unstable). Haven't tried all FAQ suggestions yet. No problems in other games and GL apps. I made sure to delete .zsnes folder with configs before every zsnes upgrade.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Exactly. SPC emulation is required for accurate emulation, but requires more CPU work, of course.kieran wrote:What is the difference between Disable Spc Emulation and Disable Sound? IIss tthe SPC sstill being emulated when just sound is disabled?
Disabling sound just mutes the output.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
slow on Mepis
Solved this problem using OpenGL video mode (oops). Didn't get to this before because version 1.40 persistently crashes when I change the video modes (complete freeze, destabilization of X). Same after upgrading Nvidia driver from version 6629 to 7174. Later versions of Zsnes don't do this. Without using OpenGL, I get 80% cpu usage without any games running, 99% with games. With OGL, 2% and 95%. With bilinear filtering, 10% just sitting in the GUI. Running in Fluxbox. I've also had good performance running Zsnes in Blackbox, somewhat less so in KDE (naturally).
Re: Really high CPU usage in ZSNES 1.42 Linux!?
<troll>kyo-KUSANAGI wrote:Is it just me, or is ZSNES being a CPU hog on my VIA C3 running Gentoo Linux? Because ZSNES consistently gets 40+fps with 512x448 resolution, no filters and 60%CPU (X takes up the other 30% or so), while my Athlon 1800+ does the same thing with 1% CPU, running Windows XP. Not exactly a fair comparison, but I would like to know if this is Linux's fault or VIA's fault.
You all know Gentoo, it's a source distro, my CFLAGS are -Os -march=c3 -m3dnow -mmmx. Except that that won't really help, because ZSNES is all assembly for x86, right?
EDIT: just in case somebody points out that my Athlon is really really good like that, a Pentium II Celeron 433MHz (win98) gave better frame rates than this VIA C3 at 933MHz.
The hell is wrong with you Gentoo people? Oh wait, someone's got that covered:
http://www.funroll-loops.org
Using -Os is just begging for trouble...along with most Cflags; it probably would explain a number of problems. I could not make X take up 30% of my CPU if I begged it to, and I'm on a 900 mhz machine. Cflags will not help you; they MAY save you 1/10 of a second...but its a trade-off for instability, un-explainable bugs and a much longer amount of time required to compile. Think about it.
I bet if you rebuilt your system with *just* -O and -march=c3, you wouldn't have any problems...or better yet, used a binary distro.
</troll>
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Pah. Seriously, you think some optimizations will create unstable builds ?Sol wrote:Using -Os is just begging for trouble...along with most Cflags; it probably would explain a number of problems.
(...)
they MAY save you 1/10 of a second...but its a trade-off for instability, un-explainable bugs and a much longer amount of time required to compile. Think about it.
The zsnes source isn't as fucked up as you make it sound.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Dark Wind
- Posts: 1271
- Joined: Thu Jul 29, 2004 8:58 pm
- Location: Texas
- Contact:
Re: Really high CPU usage in ZSNES 1.42 Linux!?
Oh, shut up. I build ZSNES myself, and I use Windows. I compile it with -Os and I've never had problems.Sol wrote:<troll>kyo-KUSANAGI wrote:Is it just me, or is ZSNES being a CPU hog on my VIA C3 running Gentoo Linux? Because ZSNES consistently gets 40+fps with 512x448 resolution, no filters and 60%CPU (X takes up the other 30% or so), while my Athlon 1800+ does the same thing with 1% CPU, running Windows XP. Not exactly a fair comparison, but I would like to know if this is Linux's fault or VIA's fault.
You all know Gentoo, it's a source distro, my CFLAGS are -Os -march=c3 -m3dnow -mmmx. Except that that won't really help, because ZSNES is all assembly for x86, right?
EDIT: just in case somebody points out that my Athlon is really really good like that, a Pentium II Celeron 433MHz (win98) gave better frame rates than this VIA C3 at 933MHz.
The hell is wrong with you Gentoo people? Oh wait, someone's got that covered:
http://www.funroll-loops.org
Using -Os is just begging for trouble...along with most Cflags; it probably would explain a number of problems. I could not make X take up 30% of my CPU if I begged it to, and I'm on a 900 mhz machine. Cflags will not help you; they MAY save you 1/10 of a second...but its a trade-off for instability, un-explainable bugs and a much longer amount of time required to compile. Think about it.
I bet if you rebuilt your system with *just* -O and -march=c3, you wouldn't have any problems...or better yet, used a binary distro.
</troll>
[u][url=http://bash.org/?577451]#577451[/url][/u]
-
- New Member
- Posts: 5
- Joined: Fri Oct 22, 2004 1:40 pm
Are any of you usnig psx controllers,through the parallel port by chance? I've had significant performance problems when ever using a psx controller with the gamecon driver loaded.You can tweak the driver so that it hurts performance a fair amount less but I could never get it to work flawlessly.As for CFLAGS -Os is perfectly safe for pretty much everything and is actually quite conservative.
...So why exactly is there an option to kill it? Sure there's more CPU used, but if disabling it breaks games...grinvader wrote:SPC emulation is required for accurate emulation, but requires more CPU work, of course.kieran wrote:What is the difference between Disable Spc Emulation and Disable Sound? IIss tthe SPC sstill being emulated when just sound is disabled?