SRCDS Steam group


2000fps #sourcekernel
#46
Code:
#include <stdio.h>
#include <time.h>
#include <sys/time.h>

int main() {
  struct timeval t0,t1;
  int usec;

  gettimeofday(&t0,NULL);
  usleep(250);
  gettimeofday(&t1,NULL);

  usec = t1.tv_usec - t0.tv_usec + 1000000*(t1.tv_sec - t0.tv_sec);
  printf("usecs: %d\n",usec);
}

On my system (HZ=100 and dynticks) I get values slightly above 250 (e.g. 258) usecs, which proves that usleep does not depend on HZ - if you configure your kernel correctly.

Can someone test my howto on wiki.fragaholics.de if it works with HZ=100 and dynticks? It could make thinks a little better, because you have fewer interrupts...
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#47
I am trying it now with the tutorial and dyn tics and 100hz, i shall edit the post once done.

EDIT: The server fps didn't remain as stable.
Reply
#48
drazah Wrote:EDIT: The server fps didn't remain as stable.

can you post the result of a fps-meter measurement?
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#49
BehaartesEtwas Wrote:
Code:
#include <stdio.h>
#include <time.h>
#include <sys/time.h>

int main() {
  struct timeval t0,t1;
  int usec;

  gettimeofday(&t0,NULL);
  usleep(250);
  gettimeofday(&t1,NULL);

  usec = t1.tv_usec - t0.tv_usec + 1000000*(t1.tv_sec - t0.tv_sec);
  printf("usecs: %d\n",usec);
}

On my system (HZ=100 and dynticks) I get values slightly above 250 (e.g. 258) usecs, which proves that usleep does not depend on HZ - if you configure your kernel correctly.

Can someone test my howto on wiki.fragaholics.de if it works with HZ=100 and dynticks? It could make thinks a little better, because you have fewer interrupts...

so what exactly does this code do? it makes it so you can go to 1000FPS on a 100hz kernel?

What is the benefit of using a 100hz kernel with this code compared to a 1000hz kernel?
Reply
#50
iliketohostservers Wrote:
BehaartesEtwas Wrote:
Code:
#include <stdio.h>
#include <time.h>
#include <sys/time.h>

int main() {
  struct timeval t0,t1;
  int usec;

  gettimeofday(&t0,NULL);
  usleep(250);
  gettimeofday(&t1,NULL);

  usec = t1.tv_usec - t0.tv_usec + 1000000*(t1.tv_sec - t0.tv_sec);
  printf("usecs: %d\n",usec);
}

On my system (HZ=100 and dynticks) I get values slightly above 250 (e.g. 258) usecs, which proves that usleep does not depend on HZ - if you configure your kernel correctly.

Can someone test my howto on wiki.fragaholics.de if it works with HZ=100 and dynticks? It could make thinks a little better, because you have fewer interrupts...

so what exactly does this code do? it makes it so you can go to 1000FPS on a 100hz kernel?

What is the benefit of using a 100hz kernel with this code compared to a 1000hz kernel?

That "code" is just to check the usleep time. It has nothing to do with getting 1000FPS from the kernel.
Reply
#51
oh, how do you run the code? put it into a .sh file?
Reply
#52
no. put it into a c-file (e.g. test.c), then run "gcc test.c -o test" and "./test".
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#53
Im getting 260, good or bad? I believe my kernels 1000hz
Reply
#54
iliketohostservers Wrote:Im getting 260, good or bad? I believe my kernels 1000hz

in theory, you should get 250, as the usleep should sleep for 250 usecs. in reality you will not achieve this, especially if you dont give realtime scheduling and priority to the process, so 260 is pretty normal (i got 258 most of the time).

it should only demonstrate that usleep does not depend on kernel HZ. if it would, you could not get below 1000 usecs on a HZ=1000 kernel.

its not meant to be some kind of benchmark ^^
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#55
Hey BehaartesEtwas, I've sent you a PM. Would it be possible you could help me out?
Reply
#56
Quote:Do not ask technical questions via PM!
Toungue
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#57
Hey!

I followed your kernel and I am trying to run CS 1.6 server. The server seems to be stable with 0 players, but when players join, like more than 6 (around 10) the fps starts to drop. It goes from 500-1000 every like 5 seconds.

I did not follow the priority part of your guide, since I start the server with nice already..

I am using Intel 5100 motherboard northbridge, and dual quad-core xeons at 2.33 ghz.
Reply
#58
Dario Wrote:I did not follow the priority part of your guide, since I start the server with nice already..

that's not the same and will probably the cause....
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#59
How many of those idlers should I run? And on which core? (I have an 8-core system).
Reply
#60
Quote:Running only one idler even on systems with 2 or more cores should be enough (also if you run multiple game servers).

I generally don't recommend binding anything to specific cores, neither the game servers nor the idler.
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply


Forum Jump:


Users browsing this thread: 18 Guest(s)