Score:-1

tcp client which makes many outgoing connections

tr flag

My TCP client need to connect to thousands servers (in local network) all at once. Communication is simple. 10 bytes string TCP request, 20 bytes response.

I have gigabit network.

when client connects servers one by one no issues. But when all at once I have success with 1000 servers and others failing with errors: normally no route to host.

My clients running on brandnew NUC with i7. I was tweaking TCP stack :

sysctl -w fs.file-max=100000
mtu 500, 3000, 9000
ulimit -n 32000 2000 3000 5000 

But no success. Best I managed to get is 1800 connections Do u know how to overcome this issue?

Score:0
tr flag

I have managed to fix that issue so let me share how: with dmesg i find out that:

> [145307.501197] neighbour: arp_cache: neighbor table overflow!
> [145307.567830] neighbour: arp_cache: neighbor table overflow!
> [145308.354244] neighbour: arp_cache: neighbor table overflow!
> [145308.479650] neighbour: arp_cache: neighbor table overflow!

so solution was to increase ARP table:

sysctl -w net.ipv4.neigh.default.gc_thresh1=16000
sysctl -w net.ipv4.neigh.default.gc_thresh2=20000
sysctl -w net.ipv4.neigh.default.gc_thresh3=24000 
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.