PDA

View Full Version : HOWTO: Benchmarking in Linux


Shelnutt2
06-23-07, 10:23 PM
First things first, you need to install GNU/Linux on your Hard Drive. There are a number of distro's available, most probably will choose Ubuntu/Kubuntu simply for its easy to setup. This distro is fine.
If your trying to squeeze out ever millisecond or point, then load up Gentoo and install it. With Gentoo you compile your own kernel and only load the drivers you need, no extra baggage you get with a distro like Ubuntu or Debian, where you use a generic kernel and load the drivers as modules. For help with a Gentoo install, feel free to pm me or post up in the Alt OS section.

First download your distro, and burn it to a CD/DVD.
http://www.ubuntu.com/getubuntu/downloadmirrors
www.kubuntu.org/download.php
http://www.gentoo.org/main/en/where.xml

64 or 32bit version work. There is currently no performance benefit for installing the 64bit OS over the 32bit, unless you want more than 4 gigs of ram. If you download the 64bit version, you'll need to install the 32bit libraries for Ubuntu/Kubuntu is as simple as sudo apt-get install ia32-libs



WINE:
Wine isn't a benching program, it is a compatibility layer to run Windows programs in Linux. Its not fully implemented and many features are still being worked on but nearly ever day patches are being put in.

To install WINE, we will use the latest GIT (the new CVS/SVN) of Wine. This is the development branch. When a patch is posted up it goes to the GIT version of wine. The stable published versions of wine come from this. Because of this and the fact that DX patches are implemented weekly, we'll install this version.

I assume everyone is running 32 bit OS? If you are running a 64bit OS see the thread here (http://www.ocforums.com/showthread.php?t=495399) (and only follow the instructions on how to install wine.
1) install GIT.
Debian Based (Ubuntu/Kbuntu):
apt-get install git-core
Gentoo
emerge dev-util/git
2) Download wine
git clone git://source.winehq.org/git/wine.git wine-git
3) Change to the wine-git directory
cd wine-git
4) compile wine
./configure && make clean && make depend && make
5) install wine
sudo make install
6) test
winecfg (opens the wine config)
7) Tweaking:
wine regedit and go to HKEY_CURRENT_USER -> Software -> Wine

Here add a new key and name it OpenGL

Create a new string value inside OpenGL and name it DisabledExtensions

Double click it and add as value GL_ARB_vertex_buffer_object

(registry entries are case sensitive)
8) Save the following to a .reg file and load it also into the regedit.
REGEDIT4



[HKEY_CURRENT_USER\Software\Wine\Direct3D]

"DirectDrawRenderer"="opengl"

"OffscreenRenderingMode"="backbuffer"

"opengl"="enabled"

"RenderTargetLockMode"="auto"

"UseGLSL"="enabled"

"VideoMemorySize"="256"
Change the 256 in memory size, to what ever your video card is.

9) More tweaking:
http://wiki.winehq.org/UsefulRegistryKeys
You can try some of those. Like always some tweaks work for some people, some don't.

Shelnutt2
06-23-07, 10:24 PM
First up in the line of benchmarking is SuperPi.

Now I'll be the first to admit that SuperPi for linux is not the same as it is for windows, its a rewrite of the code. Non the less it is still under the name SuperPi. It currently is at version 2.0.

Download:
ftp://pi.super-computing.org/Linux/super_pi.tar.gz
or
http://www.di.uminho.pt/~apa/directo...uper_pi.tar.gz
(same files)

1. open a console window
2. mkdir superpi
3. cd superpi
4. wget -o ftp://pi.super-computing.org/Linux/super_pi.tar.gz
5. tar xvf super_pi.tar.gz
6. chmod +x pi
7 ./pi 20

20 means 20 bit number, which equals 1m

If you want to try and get a few milliseconds more off the time. Try stopping the X server, and running from the CLI.
KDE:
sudo /etc/init.d/kdm stop
Gnome:
sudo /etc/init.d/kdm stop
(to start them back up type the same command but with "start" instead of "stop")

Shelnutt2
06-23-07, 10:25 PM
3Dmark2001:
You may or may not see an improved Score with 3Dmark2001. If you have an nvidia card you should see a slight improvement. If you have a ATI card, then you just need to test it.

1) Download 3DMark2001
cd ~/ && wget -o http://files1.extremeoverclocking.com/3dfb29bca4bb9a25daf83e1dd5dcb6d2/benchmarks/3dmark2001se.exe
2) Install wine 3dmark2001se.exe
3) locate the directory you installed 3dmark2001 to. (note: your c drive is under /home/username./.wine/drive_c/)
4) cd /to/the/directory/of/3dmark2001
5) run with wine 3dmark2001.exe


3DMark03

1) Download 3DMark03
2) Install wine 3dmark03.exe
3) locate the directory you installed 3dmark03 to. (note: your c drive is under /home/username./.wine/drive_c/)
4) cd /to/the/directory/of/3dmark03
5) run with wine 3dmark03.exe

Shelnutt2
06-23-07, 10:26 PM
Yep need this one too.

Shelnutt2
06-23-07, 10:26 PM
Ok this is the last one I promise

El<(')>Maxi
06-24-07, 01:49 AM
Lookin good Shel, thanks!

Deanzo
06-24-07, 02:08 AM
Shouldnt we be keeping this under lock and key for now :sn:

sno.lcn
06-24-07, 10:24 PM
Great work so far steve, you're awesome!

inkfx
06-24-07, 10:52 PM
Shouldnt we be keeping this under lock and key for now :sn:
I think if Linux is going to be allowed in the contest all participants should have a chance at some kind of crash course.

Big help Shell. Thanks man! Been wonderin' about this for some time.

||Console||
06-24-07, 11:09 PM
So has any one done alot of testing yet ? are the benchs faster vs Winblows ?

Shelnutt2
06-24-07, 11:35 PM
So has any one done alot of testing yet ? are the benchs faster vs Winblows ?

http://wiki.winehq.org/BenchMark-0.9.33

That was 6 versions ago, and there have been numorus sound and D3D9 fixes since then. The biggest thing was a major sound fix in version 0.9.37.

The linux version of Super Pi beats the windows version by a few seconds everytime. I'm talking about straight linux, not running the windows version in wine.