Sending and receiving many emails slows down the network

Recently, when I send out a few hundred thousand emails (and receive a lot of bounces as well), the network slows down. It covers everything. SSH in, wget out, etc. The outgoing connections even time out sometimes.

I have a keep state kind of pf config. It was there for years without any problems. I have been sending out this amount of emails for years. I started experiencing the issue only this year. As I know little about the networking, at first attempt, I raised some limits to:

Code:
set limit { states 80000, frags 40000, src-nodes 40000 }

The main reason I did it was that I had no better idea. It didn’t help. And I think it’s not the pf because

pfctl -d

also does not help.

I also tried:

Code:
# Drop tcp packets destined for closed ports (default 0)
net.inet.tcp.blackhole=2

# Drop udp packets destined for closed sockets (default 0)
net.inet.udp.blackhole=1

as far as I remember, it didn’t help either. Anyway, I kept it like that.

The only thing that I could do and it always helped was a reboot. I hope there are better options.

By the way, there is this in the dmesg:

Code:
Limiting closed port RST response from 266 to 200 packets/sec
Limiting closed port RST response from 259 to 200 packets/sec
Limiting closed port RST response from 210 to 200 packets/sec
Limiting closed port RST response from 288 to 200 packets/sec
Limiting closed port RST response from 208 to 200 packets/sec
Limiting closed port RST response from 382 to 200 packets/sec
Limiting closed port RST response from 333 to 200 packets/sec
Limiting closed port RST response from 299 to 200 packets/sec
Limiting closed port RST response from 252 to 200 packets/sec
[zone: pf states] PF states limit reached

As for the last line. If it’s the pf, I don’t get why pfctl -d didn’t help. One more thing I tried and didn’t help was ifconfig em0 -tso.
 
Back
Top