Page 1 of 1

STK 0.7.x: 32-bit vs. 64-bit

PostPosted: 28 Jul 2011, 11:06
by lennart
Hi guys,

I've been upgrading STK to version 0.7 recently, on various computers. On 32-bit computers, I've noticed a huge delay in loading stuff. The game itself performs fine on 32-bit, but loading the initial screen (i.e. when starting the program), and then loading games, takes like forever (several minutes). On 64-bit machines, everything loads "instantly", even on a laptop that surely can't be considered a gaming machines.

I'm on openSuse 11.4, Linux kernel version 2.6.37, KDE 4.6.0, on all machines. Machine features vary greatly (e.g. from 2 GB to 8 GB RAM), but it's clearly a 32-bit vs. 64-bit issue.

Any suggestions why this is so? Maybe ideas what settings to change on the 32-bit machines to make loading faster? Thanks for any pointers!

P.S. STK 0.7 is a great step forward! Thanks!

Lennart

Re: STK 0.7.x: 32-bit vs. 64-bit

PostPosted: 29 Jul 2011, 01:33
by Auria
I somewhat doubt that 32- vs 64-bits makes such a big difference; are you sure there is no other factor? many people run STK 32-bits and don't report such slow load times

Re: STK 0.7.x: 32-bit vs. 64-bit

PostPosted: 29 Jul 2011, 03:53
by Kinsu
lennart {l Wrote}:Machine features vary greatly (e.g. from 2 GB to 8 GB RAM), but it's clearly a 32-bit vs. 64-bit issue.

Mhhh. With 4 times more RAM, I would rather be tempted to think the contrary :think: (of course 8GB are only possible with 64bit, so this is indirectly related)

I ran STK on a 64bit ubuntu (with 1GB RAM), the loading time was indeed faster than on my 32bit osx (1GB RAM too), but not that much. Just enough to be noticeable, not more.

Re: STK 0.7.x: 32-bit vs. 64-bit

PostPosted: 29 Jul 2011, 06:12
by hiker
lennart {l Wrote}:I've been upgrading STK to version 0.7 recently, on various computers. On 32-bit computers, I've noticed a huge delay in loading stuff. The game itself performs fine on 32-bit, but loading the initial screen (i.e. when starting the program), and then loading games, takes like forever (several minutes). On 64-bit machines, everything loads "instantly", even on a laptop that surely can't be considered a gaming machines.

Where did you get the executables from, esp. irrlicht? Note that we had for a while some static linux packages that had irrlicht compiled in debug mode. This would make a huge difference.

Also make sure that no other applications are running, or hitting the disks, and make sure to start and close stk a couple of times (OS will cache the kart models, which is what takes most of the time).

Otherwise: can you try to compile STK yourself, and enable profiling (-gp) - for STK as well as irrlicht? Then run it on both machines and post the two profiles here? Let me know if you need additional instructions for this.

Cheers,
Joerg

Re: STK 0.7.x: 32-bit vs. 64-bit

PostPosted: 08 Aug 2011, 17:21
by lennart
All: Thanks for pointing out some clues!

It's certainly a problem with my 32-bit machine, although I agree it's not necessarily a 32-bit machine issue. The 32-bit laptop has 2 GB memory, and the 64-bit laptop (where STK runs blazingly fast) has 3 GB.

I'm on openSuse 11.4 here, on all my machines. I'm a slave to yast, so here's what the openSuse build service currently offers (and which is installed here):

  • irrlicht-1.7.2-2.1
  • irrlicht-1.7.9.3629-2.1
  • supertuxkart-0.7.2-1.1

Is there a way to find out which of the installed Irrlicht libraries STK actually uses? And if so, is there a way to detect whether or not the particular lib was compiled with debugging (file size?)?

Again, thanks for any help!

Lennart

Re: STK 0.7.x: 32-bit vs. 64-bit

PostPosted: 08 Aug 2011, 17:33
by lennart
Sorry, update on my previous post. Apparently, STK on my 32-bit uses libIrrlicht.so.1.8.0-SVN:

astraia:/usr/lib # ls -lh libIrrlicht.so*
lrwxrwxrwx 1 root root 18 8. Aug 18:07 libIrrlicht.so -> libIrrlicht.so.1.8
lrwxrwxrwx 1 root root 20 26. Dez 2010 libIrrlicht.so.1.7 -> libIrrlicht.so.1.7.2
-rwxr-xr-x 1 root root 5,7M 19. Dez 2010 libIrrlicht.so.1.7.2
lrwxrwxrwx 1 root root 20 8. Aug 18:06 libIrrlicht.so.1.8 -> libIrrlicht.so.1.8.0
lrwxrwxrwx 1 root root 24 8. Aug 18:06 libIrrlicht.so.1.8.0 -> libIrrlicht.so.1.8.0-SVN
-rwxr-xr-x 1 root root 6,0M 18. Apr 11:38 libIrrlicht.so.1.8.0-SVN

For comparison, this is what one of my 64-bit boxes uses:

atlas/usr/lib64 # ls -lh libIrrlicht.so*
lrwxrwxrwx 1 root root 20 10. Mär 14:40 libIrrlicht.so.1.7 -> libIrrlicht.so.1.7.2
-rwxr-xr-x 1 root root 6,5M 19. Dez 2010 libIrrlicht.so.1.7.2
lrwxrwxrwx 1 root root 20 18. Apr 20:01 libIrrlicht.so.1.8 -> libIrrlicht.so.1.8.0
lrwxrwxrwx 1 root root 24 18. Apr 20:01 libIrrlicht.so.1.8.0 -> libIrrlicht.so.1.8.0-SVN
-rwxr-xr-x 1 root root 6,6M 18. Apr 11:39 libIrrlicht.so.1.8.0-SVN

Judging from file size, none of these SO files looks like a debug version.

Re: STK 0.7.x: 32-bit vs. 64-bit

PostPosted: 09 Aug 2011, 14:41
by hiker
lennart {l Wrote}:It's certainly a problem with my 32-bit machine, although I agree it's not necessarily a 32-bit machine issue. The 32-bit laptop has 2 GB memory, and the 64-bit laptop (where STK runs blazingly fast) has 3 GB.

A simple test to see where this is coming from would be to rename most of the data/karts/*/kart.xml files into something else - then the karts will not be loaded (but leave at least one kart). Does this make a significant difference? It might be a difference of the disks(?). What about the time it takes to load a track (after selecting number of laps, before the race starts)? And what about the performance once the game is running? Press F12 to see the FPS in the game.

...
Is there a way to find out which of the installed Irrlicht libraries STK actually uses? And if so, is there a way to detect whether or not the particular lib was compiled with debugging (file size?)?

ldd ...PATH_TO_SUPERTUXKART/supertuxkart will show you which dlls are used. Which lib is compiled without debug is more difficult. Checking the size will only tell you which files have symbols, but that doesn't (necessarily) mean that they are optimised. You can have optimised code with symbols, and non-optimised code without symbols.

One other test: start supertuxkart with the option --debug=all. This will show a lot of debug output. Since the difference is minutes perhaps you can notice which lines of output are slower. We don't have any inbuild timing functions in STK :(

Did running the executable several times in a row make a difference?

Cheers,
Joerg

Re: STK 0.7.x: 32-bit vs. 64-bit

PostPosted: 10 Aug 2011, 19:32
by xeno74
STK is a bit faster on 64-bit. I've tested with Ubuntu 10.04 64-bit.