# UDP drops on Gentoo Linux with hlds.

## Lizardman132

Greetings.

Recently I have installed Gentoo GNU/Linux on my server with about 10 hlds processes.

Everything was really good, but after about one hour of hlds uptime network on machine begin to lag.

Lag behaviour is rather strange: every minute (approx) network hangs for a couple of seconds, ping time to any host jumps up to about 2000ms, and about 100 UDP packets go away. If I check netstats -us right after lag, "send buffer errors" increases by 100.

When there's no hlds on server, everything is OK. 

It's not hardware problem, I copied all setting and hlds to another machine with similar hardware, but the problem remained.

What was done to solve the problem:

1. Changed all buffer parameters (UDP and TCP) via sysctl. I mean rmem, wmem, etc. - no effect.

2. Updated e1000e Intel ethernet driver to last version. - no effect.

3. Changed InterruptThrottleRate on driver and TxIntDelay - no effect.

4. Used generic gentoo kernel config - no effect.

5. Increased txqueuelen - no effect.

NOTICE: system load with 10 servers on 8 cores is really low, so it isn't overload problem. Hard disks state is OK, network without hlds works perfectly.

Does anyone have ideas how to solve this? Working on this problem for a week and don't know what to do anymore  :Crying or Very sad: 

Server configuration:

 # lspci | grep Eth

```
05:00.0 Ethernet controller: Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper) (rev 01)

05:00.1 Ethernet controller: Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper) (rev 01)
```

# uname -a

```
Linux  3.3.8-gentoo #1 SMP PREEMPT Mon Jul 16 21:58:14 MSK 2012 x86_64 Intel(R) Xeon(R) CPU E5430 @ 2.66GHz GenuineIntel GNU/Linux
```

# netstat -us

```
IcmpMsg:

    InType0: 934

    InType3: 13463

    InType8: 22214

    InType11: 389

    OutType0: 22214

    OutType3: 6624

    OutType8: 936

    OutType11: 123

Udp:

    8982023 packets received

    14682 packets to unknown port received.

    11 packet receive errors

    9474541 packets sent

    0 receive buffer errors

   [B] 134445 send buffer errors[/B]
```

# ifconfig eth0

```
eth0      Link encap:Ethernet  HWaddr 00:15:17:4f:06:00

          inet addr:  Bcast:  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:10050024 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10049256 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:2000

          RX bytes:915841273 (873.4 MiB)  TX bytes:1529610706 (1.4 GiB)

          Interrupt:18 Memory:b8820000-b8840000
```

# sysctl -a | grep core

```
kernel.core_uses_pid = 0

kernel.core_pattern = core

kernel.core_pipe_limit = 0

error: permission denied on key 'net.ipv4.route.flush'

net.core.somaxconn = 128

net.core.xfrm_aevent_etime = 10

net.core.xfrm_aevent_rseqth = 2

net.core.xfrm_larval_drop = 1

net.core.xfrm_acq_expires = 30

net.core.wmem_max = 8388608

net.core.rmem_max = 8388608

net.core.wmem_default = 65536

net.core.rmem_default = 65536

net.core.dev_weight = 64

net.core.netdev_max_backlog = 4000

net.core.netdev_tstamp_prequeue = 1

net.core.message_cost = 5

net.core.message_burst = 10

net.core.optmem_max = 20480

net.core.rps_sock_flow_entries = 0

net.core.netdev_budget = 300

net.core.warnings = 1
```

Traceroute from HLSW:

http://lizardman.ru/images/lag.png

----------

## bjlockie

Does dmesg show any errors?

What about smartctl on your hard disks?

----------

