Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Not really a network guy so please bear with me.

I'm currently hosting a web application that sends UDP to all IP addresses in it's subnet periodically. That's 2048 IPs. My problem is it throws No buffer space available after sometime.

I adjusted some values using sysctl namely:

  • net.ipv4.neigh.default.gc_thresh1 = 2048
  • net.ipv4.neigh.default.gc_thresh2 = 4096
  • net.ipv4.neigh.default.gc_thresh3 = 8192

And it worked, but severely slows down the response time of the server. It's written in Java and running in a fit-pc2 (1.1ghz, 1gb of RAM, SD card) Oh the horror.

Given the limited resources, how do I optimize the server/kernel parameters to address the No buffer space available problem?

share|improve this question
add comment

1 Answer 1

It's not the sysctl setting as such, your server is slowing down as it has to continuously scan through an arp table with 2k entries.

Things worth trying are:

  • increasing the default "arp cache timeout" from 60s to 3600s. This will lower the average arp-request rate from 34 req / s to 0.5 req / s.
  • adding all interesting MAC addresses statically to the arp table

However, your best option is to separate your server from the 2k hosts by a router.

  • If you can change the IP from your server just put it in another subnet
  • If you can't change the IP you can split a /30 subnet of the /21 subnet and use a proxy-arp feature to glue them
share|improve this answer
    
Hey, thanks for the explanation and tips. I'll try those out. But it's rather interesting to point out that I've enabled net.ipv4.conf.all.arp_filter after reading austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.arp_problem.html and the issue seems to go away. I will have to do more research. Excuse my ignorance. –  Bro Kevin D. May 9 '13 at 1:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.