# HowTo optimize the "ping" of my server

## MaGuS

Hi all,

I am running a game server on my web-/mail-server.

I would like to know if someone tried to optimize the ping of a server by kernel setting or something else.

I am running the gentoo-sources 2.6.15 on an dell power edge 750.

I already tried the setting in this thread. But this only changed the overall performance of the server (my feeling), but not especially the "ping".

Here are some infos:

```
*** root@merlin: 22:03: 31 files -> ethtool eth0

Settings for eth0:

        Supported ports: [ TP ]

        Supported link modes:   10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Supports auto-negotiation: Yes

        Advertised link modes:  10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Advertised auto-negotiation: Yes

        Speed: 100Mb/s

        Duplex: Full

        Port: Twisted Pair

        PHYAD: 0

        Transceiver: internal

        Auto-negotiation: on

        Supports Wake-on: umbg

        Wake-on: d

        Current message level: 0x00000007 (7)

        Link detected: yes

```

Thanks for any hint.  :Wink: 

Magnus

----------

## kashani

Your server can make a ping slow by having a loaded server that takes a long time to answer the ICMP packet, but you can not make it any faster than the underlying network. Assuming your server is propwerly tuned you're pretty much out of luk on ping times unless you have multiple connections to the Internet and an play BGP routing games.

kashani

----------

## MaGuS

I thought as much, but I wannted to ask here.  :Wink: 

The system load is most time under 0.3 and ram is enough free.

So I have to get in contect with the ISP hosting the Server.

Thanks for reply.

Best regards,

Magnus

----------

## PaulBredbury

Tweak the kernel to be as responsive as possible - CONFIG_PREEMPT, CONFIG_PREEMPT_BKL and CONFIG_HZ_1000.

----------

## kadeux

MaGuS,

as you are from Germany I assume you and most of your users are using a DSL line on the client side. Since you are running a game server and there is much discussion about the "fastpath" option for DSL on german gamers forums I guess you have already heard about it. The main problem of slow pings is on the client side because DSL using an interleaving error correction resulting in bad ping times. Since your server is hosted by an ISP the server connection may not be affected by this problem using a different infrastructure to connect to the internet. For the client side you can possibly order the fastpath option if your line quality is good enough and your DSL provider offer this option ( or switch to a "gamers flatrate"). Tweaking the server will not help in this situation.

You can find many informations about it by searching the web. Here are 2 links pointing to texts in german language:

http://www.netzwelt.de/news/66495-fastpathuser-leben-laenger.html

http://de.wikipedia.org/wiki/Interleaving#Interleaving_in_der_Daten.C3.BCbertragung

----------

## MaGuS

 *kadeux wrote:*   

> MaGuS,
> 
> as you are from Germany I assume you and most of your users are using a DSL line on the client side. Since you are running a game server and there is much discussion about the "fastpath" option for DSL on german gamers forums I guess you have already heard about it. The main problem of slow pings is on the client side because DSL using an interleaving error correction resulting in bad ping times. Since your server is hosted by an ISP the server connection may not be affected by this problem using a different infrastructure to connect to the internet. For the client side you can possibly order the fastpath option if your line quality is good enough and your DSL provider offer this option ( or switch to a "gamers flatrate"). Tweaking the server will not help in this situation.
> 
> You can find many informations about it by searching the web. Here are 2 links pointing to texts in german language:
> ...

 

Thanks for your reply. I already know about the "fastpath" option for  DSL. My ping for example is very low, but not on ym own server so i wanted to optimize it.

But like PaulBredbury said, the only tuning option are

```
CONFIG_PREEMPT, CONFIG_PREEMPT_BKL and CONFIG_HZ_1000.
```

Best regards,

Magnus

----------

## NTT

Preemptible kernel will actually have a negative impact on network latency, because the tcpip stack can be preempted in that case - being a kernel process it will not call preemtion, not being an interactive process. Especially letting to BKL be preemted is bad. Preempting is a pretty good tradeoff for a desktop system, no so much for server systems.

----------

## PaulBredbury

 *NTT wrote:*   

> Preemptible kernel will actually have a negative impact on network latency, because the tcpip stack can be preempted in that case

 

And on the flip side of the coin, it will have a positive impact because the average delay before answering the ping will be shorter.

A gamer wants regularly fast pings, rather than a mixture of fast and slow pings, in the same manner that a desktop user doesn't want to see a 1-second delay between pressing a key and seeing a character appear on the screen. A gaming server is a specialized server.

----------

## colobolo

We had the same issue.

A new kernel was compiled with these tuning options: CONFIG_PREEMPT, CONFIG_PREEMPT_BKL and CONFIG_HZ_1000. 

. and that did the trick.. 

GameServer ingame ping times dropped from >30 to about 11 to 15 ms. Which is good enough for us   :Smile: 

thanks PaulBredbury and others for pointing in the good direction.

----------

