Author Topic: gentoo benchmark  (Read 2687 times)

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
gentoo benchmark
« on: February 14, 2007, 03:59:35 pm »
Hello there,
to show how gentoo is beautiful, i try to launch ps from binary (ps-bin) and from compile (ps-com) to see which one is quicker,
then i got something bad to tell you, ps-com is slower than ps-bin :(
ps-bin:
ap bdroad1 loaded successfully in 2299ms
Map korogan loaded successfully in 524ms
Map magicshop loaded successfully in 1186ms

ps-com:
Map bdroad1 loaded successfully in 2620ms
Map korogan loaded successfully in 585ms
Map magicshop loaded successfully in 1220ms

so i need to work on that now, to make our gentoo quicker than binary,
see you
loux.thefuture
PS: i will try to compile static CS/CEL in ps-com to see


Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: gentoo benchmark
« Reply #1 on: February 14, 2007, 04:49:55 pm »
I should note that I compile the binaries on gentoo ;) and I make sure I optimise them as much as I can (while keeping broad compatibility). So this is gentoo vs gentoo :D

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
Re: gentoo benchmark
« Reply #2 on: February 14, 2007, 04:53:27 pm »
hello xordan,
i'm trying to make CS/CEL static link to PS like you in the ebuild, what i need to do ?
i think about adding make install_staticplugins when installing CS/CEL ?
gentoo vs gentoo so gentoo will win :)
loux
PS : can you tell me which FLAGS did you ?
« Last Edit: February 14, 2007, 04:56:35 pm by loux »

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: gentoo benchmark
« Reply #3 on: February 14, 2007, 04:57:56 pm »
When building CS:
./configure
jam cs-config libs staticplugins

When building cel:
./configure
jam cel-config libs staticplugins

When building PS:
./configure
jam client_static

As for the flags, the default used by the configure scripts, plus --enable-cpu-specific-optimizations=max at ./configure

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
Re: gentoo benchmark
« Reply #4 on: February 14, 2007, 10:14:03 pm »
i have an error :(
C++ ./out/linuxx86/optimize/plugins/utilities/profiler/static/_profiler_static_reg.o
./out/linuxx86/optimize/plugins/utilities/profiler/static/_profiler_static_reg.cpp:19: erreur: caractère " de terminaison manquant
./out/linuxx86/optimize/plugins/utilities/profiler/static/_profiler_static_reg.cpp:20: erreur: caractère " de terminaison manquant

my  _profiler_static_reg.cpp (from line 18) :

static char const metainfo_profiler[] =
"<?xml version=\"1.0\"?>
"
"<!-- profiler.csplugin -->
"
"<plugin>
"
"  <scf>
"
"    <classes>
"
"      <class>
"
"        <name>crystalspace.utilities.profiler</name>
"
"        <implementation>ProfilerFactory</implementation>
"
"        <description>Profiling utility</description>
"
"      </class>
"
"    </classes>
"
"  </scf>
"

please help me
thanks
loux.thefurue

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: gentoo benchmark
« Reply #5 on: February 14, 2007, 11:07:25 pm »
Ah yes... Add an extra " to the end of all the lines starting with a ".

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
Re: gentoo benchmark
« Reply #6 on: February 15, 2007, 07:57:13 am »
thanks Xordan,
how to do that in an ebuild ?
see you
loux

Tulkhan

  • Guest
Re: gentoo benchmark
« Reply #7 on: February 15, 2007, 10:19:51 am »
Speaking of benchmarks; I've seen some screenshots where the information window (HP etc) shows an FPS counter. Anyone know how to enable that?

Bereror

  • Hydlaa Notable
  • *
  • Posts: 773
    • View Profile
    • Planeshift API
Re: gentoo benchmark
« Reply #8 on: February 15, 2007, 11:10:18 am »
Here we go, my benchmarks:

1) My own build with shared plugins and libraries:

Map bronzedoors loaded successfully in 8308ms

2) Xordan's static binary:

Map bronzedoors loaded successfully in 8203ms

3) My own static binary:

Map bronzedoors loaded successfully in 7739ms

So with my own static binary I can save 0.569 seconds when going to the Bronzedoors map compared to my other build :D
* Bereror wonders what he is going to do during these 0.569 seconds  :whistling:


Speaking of benchmarks; I've seen some screenshots where the information window (HP etc) shows an FPS counter. Anyone know how to enable that?

It was removed from PS some time ago.
PlaneShift Sources
PlaneShift API
"Words never spoken
Are the strongest resounding"

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
Re: gentoo benchmark
« Reply #9 on: February 15, 2007, 11:19:45 am »
hi, i'm moving ebuilds to make static's one :)
loux

Jannis

  • Traveller
  • *
  • Posts: 42
    • View Profile
Re: gentoo benchmark
« Reply #10 on: February 15, 2007, 01:53:29 pm »
When you just compare map-loading times you may forget that maps can be cached in RAM and so load MUCH faster when you restart the game. Even if you use another binary, the data is just the same.
Can one of you please give me short hint, how to create static binaries instead dynamically-linked ones?

Bereror

  • Hydlaa Notable
  • *
  • Posts: 773
    • View Profile
    • Planeshift API
Re: gentoo benchmark
« Reply #11 on: February 15, 2007, 02:39:38 pm »
When you just compare map-loading times you may forget that maps can be cached in RAM and so load MUCH faster when you restart the game. Even if you use another binary, the data is just the same.
Can one of you please give me short hint, how to create static binaries instead dynamically-linked ones?

I have separate map files for each client. Sure it is possible that they were still in the disk cache, because I didn't restart the computer, but I ran the same test several times to make sure that I get results that are as close to the reality as possible. The results from the Bronzedoors map were most persistent, other maps were giving much more random results, sometimes better, sometimes worse, probably due to caching.

The following instructions may have mistakes, I don't have time right now to test them and I'm just writing them down from my memory.

1. Export your own compiler flags. The following are for my PC and you may need to use something else:
Code: [Select]
$ export CFLAGS="-march=pentium4 -O3 -fomit-frame-pointer -msse3"
$ export CXXFLAGS="${CFLAGS}"

If you want to use different optimization, like -O2, scan all the Jamconfig files generated by configure scripts and remove reference to "-O3" there.

2. Get the sources as you would for dynamically linked binaries or run "jam distclean" in CS/CEL/PS and "make distclean" in CAL3D.

3. When configuring CAL3D, add "--enable-static --disable-shared" options to the configure script.

4. In the CS directory, open "plugins/utilities/profiler/profiler.csplugin" and convert CRLF line ends to LF only (Jorrit knows about it and it will be fixed in CS soon).

5. After configuring CS, open the Jamconfig file and delete the line "COMPILER.CFLAGS += "-march=i586" ;".

6. Build CS with the following command:
Code: [Select]
cs $ jam -aq staticplugins cs-config"

7. When CS is built, go to the "out/linuxx86/optimize/libs/" directory and make links to the libraries there (probably our bug that we have these library names hard-coded):
Code: [Select]
cs/out/linuxx86/optimize/libs $ ln -s libcrystalspace-1.1.a libcrystalspace.a
cs/out/linuxx86/optimize/libs $ ln -s libcrystalspace_opengl-1.1.a libcrystalspace_opengl.a
cs/out/linuxx86/optimize/libs $ ln -s libcrystalspace_staticplugins-1.1.a libcrystalspace_staticplugins.a

8. Build CEL with the following command (CEL is the only project that doesn't try to overwrite your own compiler flags):
Code: [Select]
cel $ jam -aq staticplugins cel-config

9. When CEL is built, go to the "out/linuxx86/optimize/libs/" directory and make links again (same reason than for CS):
Code: [Select]
cel/out/linuxx86/optimize/libs $ ln -s libcel_staticplugins-1.1.a libcel_staticplugins.a
cel/out/linuxx86/optimize/libs $ ln -s libceltool-1.1.a libceltool.a

10. After configuring PS, open Jamconfig and remove the line with "COMPILER.CFLAGS += "-march=i586" ;"

11. And finally, build PS with the following command:
Code: [Select]
planeshift $ jam -aq client_static
PlaneShift Sources
PlaneShift API
"Words never spoken
Are the strongest resounding"

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: gentoo benchmark
« Reply #12 on: February 15, 2007, 03:35:06 pm »
7. When CS is built, go to the "out/linuxx86/optimize/libs/" directory and make links to the libraries there (probably our bug that we have these library names hard-coded):
Code: [Select]
cs/out/linuxx86/optimize/libs $ ln -s libcrystalspace-1.1.a libcrystalspace.a
cs/out/linuxx86/optimize/libs $ ln -s libcrystalspace_opengl-1.1.a libcrystalspace_opengl.a
cs/out/linuxx86/optimize/libs $ ln -s libcrystalspace_staticplugins-1.1.a libcrystalspace_staticplugins.a

I believe I fixed that, so it's not needed. Same goes for cel.

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
Re: gentoo benchmark
« Reply #13 on: February 15, 2007, 03:46:06 pm »
hi there,
we need to symlik staticplugin : ln -s libcrystalspace_staticplugins-1.1.a libcrystalspace_staticplugins.a
other are not need,
same for cel
see you
loux

lirucan

  • Traveller
  • *
  • Posts: 47
    • View Profile
Re: gentoo benchmark
« Reply #14 on: February 21, 2007, 04:19:04 pm »
 :oops: This is an on-line game, wouldn't your server ping time also have a role to play in this?   :oops:

and as ping times fluctuate wouldn't also the map loading

P.S. I used oops as embarrassed was not working :(
gentoo lovers will laugh at our description :)

If you feel your Question has been answered please edit the original post and add [SOLVED] to the subject line!