Author Topic: Increase performance....  (Read 1159 times)

Iron

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
Increase performance....
« on: September 01, 2007, 09:04:50 pm »
Some users may gain some performance benefits if they run there client in a session.

as such: (psclient script)
Code: [Select]
#!/bin/bash

X :3 -ac & nvidia-settings --load-config-only  # Launches a new X session on display 3
cd /path/to/PlaneShift #goto ps dir
sleep 3 #break while x server starts
chmod 770 psc
export LD_LIBRARY_PATH=libs/:$LD_LIBRARY_PATH  #set lib path
DISPLAY=:3 exec ./psc "$@" #launches ps
Make sure you change the directory to your own!!This will run the ps client on a new x session. To leave this session after exiting the client, or to force the client to quit press [ctrl]+[alt]+[bkspc]. To do a sort of alt+tab you can press [ctrl]+[alt]+[f7]  (as per my ubuntu, however I'm not sure if f7 will bring you to your normal desktop on other distros).

Warning -> This does require root (or sudo/su), use at your own risk.


You can also give your client more cpu time, by adding
Code: [Select]
renice -10 -n psc  #sets nice -10 (Gives more cpu time)To the end of that file. Once again, use at your own risk.
Feel free to question me :P

Seneche

  • Guest
Re: Increase performance....
« Reply #1 on: September 01, 2007, 09:08:30 pm »
Wow, works fine here on OpenSuse 10.2 Thanks! However, it also requires you to have an Nvidia graphic card, won't it?

Iron

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
Re: Increase performance....
« Reply #2 on: September 01, 2007, 09:24:06 pm »
Oh, no, you can replace
Code: [Select]
X :3 -ac & nvidia-settings --load-config-onlywith
Code: [Select]
X :3I'm not sure if there's any specifics for ati or others, sorry.

Though I will mention I have NOT tested it without the nvidia specific settings.

[ Double-post merged. --Karyuu ]
« Last Edit: September 01, 2007, 09:41:17 pm by Karyuu »

Seneche

  • Guest
Re: Increase performance....
« Reply #3 on: September 02, 2007, 12:51:43 am »
Well, thanks. I used both and they work fine!  :) :)

Jaei Dey

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
Re: Increase performance....
« Reply #4 on: September 02, 2007, 05:43:57 pm »
Hi ...
Thanks for this tip...
but there are 2 things, i want to say:

1. There is a switch you can add. So the new session will close automatic on quit of PlaneShift: -terminate ... looks loke this in your code:
Code: [Select]
X :3 -ac -terminate & nvidia-settings --load-config-onlyor without the nVidia specific setting:
Code: [Select]
X :3 -ac -terminate &

2. The work-around, not to process all these things as "sudo" you can edit the file "/etc/X11/Xwrapper.config" as root under Ubuntu like this:
Code: [Select]
sudo gedit /etc/X11/Xwrapper.configand replace the word "console" with "anybody" how the next code shows it:
From:
Code: (original) [Select]
allowed_users=consoleto:
Code: (modified) [Select]
allowed_users=anybody

..and theres one question i have: to switch to console 7, on witch is gnome present i press [ctrl]+[alt]+[f7] ... but how can i switch back do the session 3, where ps is running?
« Last Edit: September 02, 2007, 05:48:46 pm by Jaei Dey »

Iron

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
Re: Increase performance....
« Reply #5 on: September 02, 2007, 08:44:05 pm »
In Ubuntu, :3 is on f9, I believe that f7 is actually 1? I'm not sure how that works...  And thanks for the tips, good discussions here  :lol:.

Seneche

  • Guest
Re: Increase performance....
« Reply #6 on: September 03, 2007, 12:22:05 am »
I also found it useful to go to "init 3", so that there is no X running and no background processes, and type "psclient." It will start a new X server with only Planeshift running. This helps free up memory if your low on it.