Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux performance issues
#1
Information 
Hi guys,

A while ago, I tried installing and running PCSX2 on Ubuntu on my machine. It did not run great, so I just gave up at the time. However, since I changed my CPU heatsink from the stock one to a decent one, I tried overclocking a bit my custom-build machine in order to achieve a better performance in various emulators including PCSX2.

My computer is running Ubuntu 11.04, up to date, with the Gnome 2 “classic” desktop instead of Unity and Compiz still running. There's a dual boot on the machine, too. I have a minimal Windows XP SP3 installation on a secondary partition, with limited disk space and close to nothing installed on it since I'm not really using it.

Both OSes uses the proprietary drivers for my graphic card, which is running great for what it's worth.

I installed PCSX2 in Ubuntu thanks to Gregory's PPA. There was a dependency issue though, which I solved by manually installing libsoundtouch from Lucid (was removed from Ubuntu's repositories later on for some reason). Windows has the r4861 version from Orphis.

To my dismay, when running Shadow of the Colossus (PAL, 50Hz), I noticed that the performance was so abysmal that it was unplayable. This surprised me, since this YouTube video seemed to prove that another user with a somewhat weaker CPU than mine could get the game running quite smoothly. So I fired up Windows XP to test it out, and, voilà - far from perfect without optimizations, but the game was totally playable on the system. How come?

I decided to bench the performance I obtained, aiming for speed, on this particular game. Here are my findings.

Hardware
  • CPU: Intel Core 2 Duo E4600 @ ~2,9Ghz (stock: 2,4Ghz)
  • GPU: TwinTech Nvidia 8500GS, 512Mb memory, 16 CUDA cores
  • RAM: 1x 2Gb Kingston Value RAM DDR2-6400 @ 800Mhz/2 (5-5-5-5, me thinks)
  • Motherboard: Asus P5K/SE-EPU

My CPU's details can be seen in the Windows screenshots, thanks to CPU-Z. Since I do not have this tool in Linux, I used XSensors so at least the CPU VCore voltage could be seen.

Software
I'm aiming for speed, whatever the costs. That means: stealing a lot of VU cycles, reducing the EE rate, and disabling frame limiting. When asked by the GS plugin, I chose to render the game at the native PS2 resolution with no filters. I also set the sound plugin (SPU2X) to 3-Hermite mode.

Here is the configuration in Windows:
Same stuff here in Linux:
GS plugins details:
[See this as a Imgur album]

Procedure
I chose to note down the FPS obtained:
  1. When the game displays a splash screen before the first loading
  2. During the introduction sequence (twice, to show off a graphic issue)
  3. As soon as the player can actually interact with the game
I only did a single run to catch those numbers.

Benchmarking
W = Windows, L = Linux.
I hope you have a large screen to see this as a table. I don't.

[Image: z3Nts.jpg][Image: FplwD.jpg][Image: ilypK.jpg][Image: EEBlN.jpg][Image: Sh8hO.jpg]

[Image: ZlEru.jpg][Image: O6zG1.jpg][Image: ilypK.jpg][Image: eIWWc.jpg][Image: 3Z8hn.jpg]

[Image: ycH0Q.jpg][Image: 5nkLC.jpg][Image: fFnMG.jpg][Image: QzirF.jpg][Image: TPBDb.jpg]

[Image: VO9Hw.jpg][Image: Bi5ds.jpg][Image: 1bVuf.jpg][Image: DJJjT.jpg][Image: FSHTD.jpg]

Click on the thumbnails for bigger pictures, with performance details in the window borders. Click on a ligne title to see them as an album.

One can immediately notice some rendering issues in ZeroGL (weird white bar at the top of the latter screenshots) and in ZZ OpenGL (screens are almost totally white). Also, the ZZ OpenGL plugin draws a very… fugly picture sometimes, which does not happen with the other renderers - see the second row.

Results

Code:
FPS          |  A  |  B  |  C  |  D  
=============|=====|=====|=====|=====
Win / GSdx   | 101 |  -  |  72 |  70
Win / ZeroGS |  44 |  -  |  25 |  21
Win / ZZOgl  | 109 |  29 |  29 |  28
Lin / ZZOgl  |  38 |  20 |  18 |  25




But my OS of choice is still Linux (and I'd wish to seamlessly integrate PCSX2 in my XBMC setup).
… so, any way of running PCSX2 faster in Linux?
Reply

Sponsored links

#2
learn C++, the GS architecture and contribute to making a better opengl plugin.
Reply
#3
Some hint: recompile soundtouch with sse2 optimization. Ubuntu probably removes them.

Try to recompile pcsx2 with PGO (google), play with it then recompile again with the profiled information.

For comparaison remove sse3 (or do with and without).

After the easy gain, help to improve zzogl :d
Reply
#4
Unfortunately, this is something totally out of my abilities. Sad

Is there a reason why the performance drops with ZZ Ogl in Linux, compared to the use of the same plugin in Windows?
Reply
#5
I do not know, I'm a bit surprised actually for this huge difference. Some hints could be, Compiler optimization difference, graphics drivers.The removal of optimization in library like soundtouch.
Reply
#6
Hi,

Getting similar performance problems.

Just installed Ubuntu 11.04 i386 so I could run PCSX2 and was really disappointed. Tried running Armored Core 2 and in-play frame-rate was between 13-20fps; too slow to play. My hardware should be sufficient:

Phenom II X4 3.2Ghz
Nvidia GT 240
16GB RAM

...so it looks like it's pointing to performance problems, particularly in the plugin?

Is anyone getting good results on decent hardware on Ubuntu 11.04 or other deb based Linux distros?
Reply
#7
Hum, yes it is know that the performance is often limited by the plugin (especially when speed hack is enabled) but you performance is very low.
1/ ensure that the driver is properly running and not cpu accelerated
2/ check the configuration of the plugin. Do not use AA for example, check if there is any speed hack.
3/ some games are not well emulated by the plugin it could be one of those.
4/ For what it worth you can also try GSdx with a software rendere (not GPU acceleration) but your CPU is a bit weak.
Reply
#8
Hi gregory, I appreciate your suggestions. Would love to get pcsx2 working on my system, so I'll not give up so easily. Here's my program log output when I startup:

Code:
PCSX2 0.9.9.r0  - compiled on Jun 15 2011
Savestate version: 0x9a010000

Host Machine Init:
    Operating System =  Linux 2.6.38-11-generic-pae i686
    Physical RAM     =  16152 MB
    CPU name         =  AMD Phenom(tm) II X4 840 Processor
    Vendor/Model     =  AuthenticAMD (stepping 03)
    CPU speed        =  3.211 ghz (4 logical threads)
    x86PType         =  Standard OEM
    x86Flags         =  178bfbff 00802009
    x86EFlags        =  efd3fbff

x86 Features Detected:
    MMX.. SSE.. SSE2.. SSE3
    MMX2  .. 3DNOW .. 3DNOW2.. SSE4a

Installing POSIX SIGSEGV handler...
Reserving memory for recompilers...

Loading plugins...
    Binding GS    : /usr/lib/games/pcsx2/plugins/libzzogl.so
(GameDB) 9088 games on record (loaded in 201ms)
    Binding PAD    : /usr/lib/games/pcsx2/plugins/libonepad.so
    Binding SPU2    : /usr/lib/games/pcsx2/plugins/libspu2x.so
    Binding CDVD    : /usr/lib/games/pcsx2/plugins/libCDVDnull.so
    Binding USB    : /usr/lib/games/pcsx2/plugins/libUSBnull.so
    Binding FW    : /usr/lib/games/pcsx2/plugins/libFWnull.so
    Binding DEV9    : /usr/lib/games/pcsx2/plugins/libdev9null.so
Plugins loaded successfully.

(09-17-2011, 08:09 AM)gregory Wrote: Hum, yes it is know that the performance is often limited by the plugin (especially when speed hack is enabled) but you performance is very low.
1/ ensure that the driver is properly running and not cpu accelerated
How exactly can I check this? I would assume that the libzzogl.so plugin correctly loading is what you're talking about, but I'm not sure.
Quote:2/ check the configuration of the plugin. Do not use AA for example, check if there is any speed hack.
AA is off, and I haven't tweaked any other settings. If I understand you correctly, you're saying that an enabled speed hack may be causing the slow down?
Quote:3/ some games are not well emulated by the plugin it could be one of those.
I have checked the compatability page and Armored Core 2 is listed as playable since 0.9.6. Also I've tried FF XII and the frame rate is the same, so I don't think the slow down is game specific.
Quote:4/ For what it worth you can also try GSdx with a software rendere (not GPU acceleration) but your CPU is a bit weak.
It's worth a try. I'm assuming I do that by dropping the GSdx plugin into the plugins directory (since it looks like it didn't come with the Linux deb package by default) and then set it to software emulation.

I also thought I'd try compiling from source on my system to see if that improves anything. It looks like my cpu supports sse2 and sse4a if pcsx2 takes advantage of those...

Reply
#9
Hum I need to update the natty package. For opengl try "glxinfo | grep direct" and glxgears to see an approximative speed.
Reply
#10
hi,

Sorry for taking a bit to get back.

What exactly do you need to update in the natty package?

I ran glxgears and averaged about 6000 fps. Don't know what this represents. Is glxgears a reliable way to measure graphic performance, particularly for PCSX2? I googled it and hit this, which is one person's opinion that glxgears is no good for benchmarking. Interested in hearing your thoughts.

I remembered I had a Windows XP license collecting dust so I installed XP on another partition on my system and PCSX2 works like a dream on it. It looks like the latest DirectX supported on XP is 9c, so I ran that with the SSE2 GSdx plugin and was getting consistent 50 fps for PAL and 60 for NTSC. Strangely, even though my CPU has SSE4a support, PCSX2 complained that my CPU didn't support SSE4.01. Maybe differences in instruction sets between AMD and Intel CPUs? I have a Phenom II.

I would rather run PCSX2 on Linux, but since the plugin just isn't performing well, the choice to run PCSX2 on winXP is a pragmatic one.

I have done development, mostly in Java, some C#, and C++ as well, though I haven't done any graphics programming. What is the level of difficulty to improve the linux plugin, or re-write it? Have no clue if I'd be in over my head, but thought I'd askRolleyes
Reply




Users browsing this thread: 3 Guest(s)