Author Topic: Tweaking my Linux PlaneShift  (Read 2186 times)

DracoDanube

  • Traveller
  • *
  • Posts: 18
    • View Profile
Tweaking my Linux PlaneShift
« on: January 31, 2008, 12:54:19 pm »
Abstract
The 3D engine at the heart of PlaneShift is, by default, graphically (GPU) and CPU intensive. This text suggests ways to reduce the amount of computer resources absorbed by PlaneShift.

Description
My humble configuration was (is) a three screen Linux configuration:
CPU: AMD XP2200+ (1.8mhz)
GPU: nVidia (Gainward) 6800LE (AGP) (2 screens)
GPU: TNT Riva (PCI) (1 screen)
RAM: 1.3 Gigabyte
Mobo: PC-chips K7 M848A
OS: (Linux) Kubuntu 7.10

PlaneShift ran smoothly with default settings but with the Client set to: 1024x768 windowed, on a 1280x1024 screen. I also replaced the grassy-maps with the less-grassy maps because my frame rate was impacted a little while moving around Hydlaa.

A few weeks ago my 6800LE snuffed it. When two of my screens froze I discovered that the 6800LE's fan had stopped working. Unfortunately I believe that this lead to the GPU roasting to death. Several attempts to resurrect the card with new fans have failed.

I have a couple of nVidia 4200ti graphics cards that are now about eight years old but they both support two screens. All I had to do was replace the 6800LE (RIP) with one of those cards and I was instantly up and running again. Same nVidia Linux xserver and xorg.conf.

When I fire up PlaneShift under the 4200ti... it starts. Ojaveda looks the same. The fields outside Oja look great. Creatures, buildings and frame rate all seem fine.

However at Hydlaa the problems start. Entering the Library district my frame rate really starts to struggle but I can still move. I try entering the Plazza and whap! It's all over. The frame rate is non-existent, down to perhaps one frame every two or three seconds.

Moving the mouse around the Client suffers the same problem. It is REALLY difficult to get the mouse over any menu in the bar to make Options changes.

Finally I managed to open Options and reduce the Details settings to as low as possible. This enabled me to move through the Plazza to a less intensive map; either back through the Library district, back into Ojaveda territory or through the Plazza to the Magic Shop.

Discovery: Under these circumstances, if you can point your character's view toward the sky, your frame rate immediately increases. Must have something to do with what the GPU is processing, since the sky requires very little compared to the Plazza. You will have to keep dipping the view down to get your bearings but you can navigate, slowly.

Obviously my 4200ti is not up to the job when it comes to PlaneShift but this prompted me to look into ways that I could still do some things in PlaneShift with my limited GPU capabilities.

Bottom line
While in Ojaveda territory, Hydlaa fields and Magic shop:
- Enable 'Adaptive distance' under: Options > Graphics > Details
- Min distance: 200
- Min FPS: 10
- Max FPS: 13
- FPS cap: 13

While in Hydlaa Plaza:
- Disable 'Adaptive distance'
- Distance: 35
- FPS cap: 13

- Set character's movement to: Dynamic follow
- Replace grassy maps.

Side effects:
On my Linux system, PlaneShift used to absorb 90(+)% of CPU cycles with default settings. With the changes shown here, PlaneShift is constantly using between 15 - 60% CPU.

To see a list of applications' resource usage, from a command line run: top

I made similar changes to a PS-Client on a Windows 2000 system. The CPU went from a constant 96(+)% down to between 30 - 70% CPU usage.

Linux window managers v Linux desktop environments
My goal is to use as little computer resources managing applications, making the resources available to applications that require those computer resources.

KDE and Gnome are Linux desktop environments. They don't just manage the decorations around your applications, they almost attempt to be an operating system themselves. For example, they detect when new USB hardware is plugged in to your computer and open an appropriate application for you. They have lots of eye-candy. They offer graphical user interfaces to many of the traditional command line applications. They make configuration and management of all the daemons (services) easier.

It is clear that their design and intention is to remove or make easy, fiddly or intimidating computer activities.

The downside: They are memory hogs. Any graphically intensive desktop environment, no matter what operating system, is going to be a memory hog, not to mention the impact on the CPU while it constantly monitors what is going on at the hardware levels. Then there is the GPU which has to cope with all that pretty eye-candy in additional to your applications.

Alternatives to the Linux desktop environments are the light weight window managers. Personally I use: Fluxbox
http://www.fluxbox.org

XFCE is also very popular at the moment too:
http://www.xfce.org/

I am NOT suggesting that either are better than Gnome or KDE or any other window manager or environment but I can tell you, Fluxbox is not a resource hog by any means.

Obviously I am in danger of starting a flame war here. Don't bother. A flame war about window managers v desktop environments would be a complete waste of time since we all have our own preferences and reasons for using what we use.

Further Linux tweaking, for your information
This page has some hints on tweaking memory usage on Linux.
http://lifehacker.com/software/feature/slim-down-and-speed-up-linux-333798.php

This page describes how to use a local DNS cache on Linux for faster DNS lookups:
http://ubuntu.wordpress.com/2006/08/02/local-dns-cache-for-faster-browsing/

P.S.
I believe in destiny and perhaps, just perhaps the death of my 6800 was a message of sorts, sent by those in another realm: You are spending too much fracking time, playing that fracking game!! Get on with some fracking work!

Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Tweaking my Linux PlaneShift
« Reply #1 on: January 31, 2008, 01:09:11 pm »
Planeshift is well aware of the problems with low fps's in several maps and the devs are working to solve this in time. You are not the first to notice this and i dont think the last till changes are made.

Araye

  • Hydlaa Citizen
  • *
  • Posts: 277
    • View Profile
    • The Enlightened
Re: Tweaking my Linux PlaneShift
« Reply #2 on: January 31, 2008, 02:02:48 pm »
I didn't see this post as trying to point out a problem, but rather ways to play PS on a limited system.  Maybe it's just me...

Zwenze

  • Hydlaa Resident
  • *
  • Posts: 152
    • View Profile
Re: Tweaking my Linux PlaneShift
« Reply #3 on: January 31, 2008, 02:11:08 pm »
I also tweaked my settings to play PS. I have a amd 1800+ and a radeon 9000, sso posting hints how to play PS fine is a good idea imho. what helped me a lot is setting anisotropic filtering to 8 and forcing my driver with a tool called driconf to make all textures 16 bit. gfx is poor now but very fluent. I can play well and even on plaza its allmost fluent. If anyone is intrested I can post in more detail how to get more fps when using the free drivers on a ati card using r200 or r250 chips.

Jonerian

  • Hydlaa Resident
  • *
  • Posts: 102
  • Jonerian Cruentis
    • View Profile
Re: Tweaking my Linux PlaneShift
« Reply #4 on: January 31, 2008, 06:05:11 pm »
I am working on a similar system, actually with even lower ressources (800 MHz, 512 MB RAM). I had onboard graphics about as good as your PCI Riva TNT and only PCI slots available. I could play Planeshift with that, but it was no real fun and grouping was just not an option.

I didn't want to buy a new Computer (Do'h), but it was worth a little money for me so I bought a GeForce FX 5200 with 256 MB for my PCI slot. That did cost me a freakin' 45 €, because it is the best available PCI card (you can get the AGP variant for cheap..), but that boosted this machine significantly in terms of PS (and I will keep that machine if I buy a new one soon)
With that card I can play in 1280x1024 (native resolution for my screen) fullscreen and I also checked preload models. I deactivated it first, because I thought my memory was my biggest problem, but there was enough room left for this option, which makes the game more smooth.

This might not sound like a good tweaking method, but I wouldn't be playing PS regularly with the other card and it did still not involve buying a new machine.

PS:
For people that normally don't need the 3D card, only for PS: There are possibility to use the VRAM as swap space, so you could have around 200 MB of fast swap in addition to the 512 MB of RAM. I didn't try that yet, because I am also running fluxbox on Archlinux and I didn't have big memory problems yet. The next weak point in my machine is the CPU now (after I made a RAM upgrade from 128 to 512 and have a new gfx card)

Rayken

  • Hydlaa Citizen
  • *
  • Posts: 378
  • postcount--;
    • View Profile
Re: Tweaking my Linux PlaneShift
« Reply #5 on: February 01, 2008, 12:59:07 am »
A tweak that I've found pretty effective is to build from source, throwing configure the flag --with-cpu-specific-optimizations=max (instead of --enable-debug).  Of course, this sometimes causes instability and doesn't generate any useful debug output.

As for light-weight window managers, I've come to really like fvwm and the pre-configured, pre-prettied version fvwm-crystal (just a bunch of scripts and stuff for fvwm).
"Here's to lowering caskets of old friends choice and consequence we'll birth a new day with the death of an old and start over, start over.  Here's to burying hatchets in those who you'd never call your friend...we'll birth a new day with the death of an old day and start over, start over!"

Velh Krome

  • Guest
Re: Tweaking my Linux PlaneShift
« Reply #6 on: February 02, 2008, 06:32:03 pm »
Rayken,
to build according these instructions (Download and Compile)?
if so, where to add the flag? to this one
Code: [Select]
/home/user/development/planeshift$ ./configure --with-cal3d=/home/user/development/cal3d?

Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Tweaking my Linux PlaneShift
« Reply #7 on: February 02, 2008, 06:45:32 pm »
Rayken,
to build according these instructions (Download and Compile)?
if so, where to add the flag? to this one
Code: [Select]
/home/user/development/planeshift$ ./configure --with-cal3d=/home/user/development/cal3d?

yep that is the one

Rayken

  • Hydlaa Citizen
  • *
  • Posts: 378
  • postcount--;
    • View Profile
Re: Tweaking my Linux PlaneShift
« Reply #8 on: February 04, 2008, 08:02:31 am »
Well that's one...you also want to do it when you get the that point with both CS and PS.  I don't think it effects CEL.
"Here's to lowering caskets of old friends choice and consequence we'll birth a new day with the death of an old and start over, start over.  Here's to burying hatchets in those who you'd never call your friend...we'll birth a new day with the death of an old day and start over, start over!"