News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Performance problems under Linux (Xubuntu 12.10_x64)

Started by donjuan, January 23, 2013, 10:00:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dwachs

Maybe you need to install 64bit version of this library?
Parsley, sage, rosemary, and maggikraut.

donjuan

The solution was, to manually download the 32-Bit-Editions of  "libsdl-mixer1.2_1.2.12-3" and "libbz2-1.0_1.0.6-4" from http://packages.debian.org, just for the log. Now everything works fine, like a few days ago.

But i need help with my compiled code (remember, i am no programmer, but i want to help). Check if i do right:
1. Copy file with the name "sim" in ./trunk/build/default ,  to ./trunk/simutrans
2. Download pak64 to ./trunk/simutrans
3. Try to start it in terminal (but it doesn't start). Terminal output is:
user@P67A-UD3-B3:~/trunk/simutrans$ ./sim
Use work dir /home/user/trunk/simutrans/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
user@P67A-UD3-B3:~/trunk/simutrans$


What do i wrong?

Markohs

execute the ../get_lang_files.sh insode the folder you copied "sim", I think will be enough. Thanks your your help donjuan!

donjuan

I've copied "get_lang_files.sh" to ./trunk/simutrans and ./trunk/simutrans/text (i guess the lang. file must be in there) and executed it. The language-files are installed, but  when i start "sim" i get the same output as before.

Dwachs

You have to start get_lang_files in the trunk/ directory (ie in its original location, no copying of script-file necessary)
Parsley, sage, rosemary, and maggikraut.

whoami

Regarding performance: It seems that nobody yet mentioned the binding (Windows: affinity) of the ST process (threads) to one CPU core, which in itself may improve performance by better cache usage patterns, but also allows to set only one core to maximum performance (same for two cores, if multithreading is enabled).

donjuan

QuoteYou have to start get_lang_files in the trunk/ directory (ie in its original location, no copying of script-file necessary)
Yes, thats right (I havent read the script yesterday). All lang-files are correctly stored to "./simutrans/text" but it still doesn't work.

I even tried to place the self-compiled "sim"-file to a gcc3-nighly-build directory - with no success. I think that this have to work, because my "sim"-file and the original simutrans-file are depending on the same directory structure. Maybe this proof that the problem is my "sim"-file itself ?

An idea: To finally test the hack of Markohs, can somebody send me an e-mail with a working modified st-package, that i can test on my system? (I reveal my email-adress by pm)

Markohs

mmm... I tested the fix and it isn't working. I have to make a few modifications to the code still, when I have a solution I'll contact you. Thanks for your time, donjuan. :)

captain crunch

Today when I noticed that simutrans 111.2 runs unreasonably slow on my 1.7GHz
Celeron M laptop under Ubuntu Precise, I found this thread when looking for
possible solutions.
  Interestingly, I tried running the win32 version with wine and I am
flabbergasted that it works very well this way.
  As far as I know the Celeron M does not support frequency scaling, at least I
could not activate it with the tools supplied by Ubuntu Precise. Also the
Celeron M has only one core (-8.
HTH

whoami

#44
Did you run it with (edit:) parameters "-nomidi" and "-nosound" on Linux? This is the work-around for a well-known performance problem with sound output.

captain crunch

Quote from: whoami on March 01, 2013, 09:34:41 PM
Did you run it with (edit:) parameters "-nomidi" and "-nosound" on
Linux?
Thanks for suggesting this, but this did not help very much. I noticed in wine
the MIDI sound is disabled upon program start and it is not working later.
Here is what I found:

Simutrans version/OS      fps   idle(ms) simloops  sound midi
111.2.2-1 Ubuntu Linux    4     25       4,3       off   off
111.2.2-1 Ubuntu Linux    3     25       3,0       on    on
112.1 r6212 W32 with wine 14    25       4,7       on    off




Dwachs

You could also try a recent nightly build, which should be a little faster than the last release.

I also ask you to upload your savegame. Maybe there are some unusual patterns in there, as sometimes also the style of playing matters.
Parsley, sage, rosemary, and maggikraut.

captain crunch

Quote from: Dwachs on March 02, 2013, 08:21:20 AM
You could also try a recent nightly build, which should be a little faster than the last release.
Yes, I built 112.1.1 Nightly from git for i386-linux-gnu configured with
"BACKEND=mixer_sdl". With this configuration I get 20fps and
4.1 simloops. I wonder what make the ubuntu packaged version run so much
slower, their config.default does not differ significantly.

Quote from: Dwachs on March 02, 2013, 08:21:20 AM
I also ask you to upload your savegame. Maybe there are some unusual patterns in there, as sometimes also the style of playing matters.
It is only the savegame built into the pak and vanilla simconf.tab.


Jando

Apologies for posting in an old thread but the original post describes what I see in Linux Mint (Ubuntu fork) as well. 32 bit version Linux on a 2-core AMD CPU. Performance is very bad, especially when scrolling the map. Sadly makes Simutrans unplayable for me.

Downloaded Simutrans from Sourceforge, both version 112.3 and the new version 120 release candidate. Tried with Experimental as well (Thanks, James, for the new compiled Linux version). All versions have very bad performance, with Experimental sadly showing the worst performance.

2 observations (trees and passengers/pedestrians off):

- FPS drops really fast to 4 or 5 frames per second (from about 11 or 12) when the game is paused. Pausing the game makes performance worse. :)
- Both CPU cores are at 20-40% when running Simutrans.

Miziiik

What version of SDL do you use? Maybe it can be problem of SDL or another library (old version,...) I can post here my version compiled from latest SVN rep. on Ubuntu afternoon...

Odesláno z mého NEXT pomocí Tapatalk

http://msim.8u.cz/ Můj web o hře Simutrans - Moje addons, návody, odkazy, apod.

Jando

Quote from: Miziiik on June 03, 2014, 07:12:31 AM
What version of SDL do you use? Maybe it can be problem of SDL or another library (old version,...) I can post here my version compiled from latest SVN rep. on Ubuntu afternoon...

Odesláno z mého NEXT pomocí Tapatalk

I don't even know what SDL is. :)  It's just a standard Mint installation, kept up-to-date with the Mint Update Manager.

Miziiik

It' maybe that problem :D Wait 3 hours and I post here my binary and test it

Odesláno z mého NEXT pomocí Tapatalk

http://msim.8u.cz/ Můj web o hře Simutrans - Moje addons, návody, odkazy, apod.

Markohs


I wrote  this (page one) time ago, can you try it and see if it fixes your problem?

Quote from: Markohs on January 25, 2013, 08:32:43 AM
Can you please run:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

And post the result here?

If it doesn't output "Performance", do:

echo "Performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

And test the game again to see if we get any difference?

You might need to do this for cpu0, cpu1,... all your cpu's:

EDIT: Extra reflexion:

...


Jando

Quote from: Markohs on June 03, 2014, 12:14:52 PM
I wrote  this (page one) time ago, can you try it and see if it fixes your problem?

Markohs, you're a genius. :) That completely fixes the problem.

Governor settings for both CPUs was OnDemand, after using your echo command the settings changed to Performance. Performance problem fixed for me.

Note for other people having the same problem: switch to root before using the echo command sequence, otherwise it won't let you use the command.

Edit: also my apologies for not spotting this solution on the first page of the thread. Somehow I missed it between all the other techno-speak. :)

Markohs