Server stops accepting connections after ~120,000 active on 18.04.3

I’m running a type of perf test where I have a simple TCP server with 4 IP addresses that is listening on a port and getting connections from several other computers on the local network. Everything works fine up to just under 120,000 active connections, clients are able to get messages from client and create new connections. At just under 120,000, new connections just stop appearing. There is no log activity on server and clients start getting timeouts after a bit. There is no firewall that would be getting in the way. I have tweaked a bunch of settings already:


net.core.netdev_max_backlog = 1000000  net.core.netdev_budget = 50000 net.core.netdev_budget_usecs = 5000  net.core.somaxconn = 1024000  net.core.rmem_default = 1048576 net.core.rmem_max = 16777216  net.core.wmem_default = 1048576 net.core.wmem_max = 16777216  net.core.optmem_max = 65536  net.ipv4.tcp_rmem = 4096 1048576 2097152 net.ipv4.tcp_wmem = 4096 65536 16777216 net.ipv4.udp_rmem_min = 8192 net.ipv4.udp_wmem_min = 8192 net.ipv4.tcp_fastopen = 3 net.ipv4.tcp_max_syn_backlog = 3000000 net.ipv4.tcp_max_tw_buckets = 2000000  net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_fin_timeout = 10 net.ipv4.tcp_slow_start_after_idle = 0 net.ipv4.tcp_keepalive_time = 60 net.ipv4.tcp_keepalive_intvl = 10 net.ipv4.tcp_keepalive_probes = 6 net.ipv4.tcp_mtu_probing = 1 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_rfc1337 = 1 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.all.rp_filter = 1 


* soft nofile 6553600 * hard nofile 6553600 

The limits are intentionally completely overkill because it’s just a test. Are there some other settings I am missing that would enable more connections? Neither the CPU nor RAM is being stressed so I would like to keep pushing the hardware. Server and clients are all running on AWS EC2 t3a.xlarge instances, if that makes any difference.

I will guest post on 100 different blogs , real websites, accepting cryptocurrency

I will write a 1500 words post about your website/product/service. Basically each paragraph written in 3 different ways. I will guest post it on 100 different blogs (avoiding duplicate content by rotating paragraphs, posts 100% readable by humans, no automatic spin gibberish)

  1. Each blog with different owners, different IP
  2. Each website indexed by Google and Bing
  3. Posts are made to be read by humans, no spin gibberish
  4. Natural Pace Posting : very…

I will guest post on 100 different blogs , real websites, accepting cryptocurrency

Is there a PCI Requirement for shuffling digits while accepting PIN?

The following image shows a PIN entry device which shuffles the digits.

. via twitter

I’ve seen this question, but it doesn’t cover why companies are still doing this.

I looked at the POS PIN Entry Device and the Software-based PIN Entry on COTSSecurityRequirements requirements and neither of them seems to have anything about shuffling the digits.

Is there a requirement or specification that I’m missing?

Serialization functions: accepting a sink versus returning the result

What are the pros/cons of having a serialization function accept a sink:

class Foo:   def toString(self, stringIOSink):     pass    def toBytes(self, byteSink):     pass 

versus having the serialisation function return the result:

class Foo:   def toString(self):     # ..     return s    def toBytes(self):     # ..     return bytes 

(obviously this approach is the standard when serialising to string)

I’ve seen both in the wild and up until now have never given it much thought. Note my examples are in python, but I’m asking in a language agnostic context.

Considerations I’ve thought of:

accepting a sink

  • implementation does not need to allocate memory (and thus client does not need to worry about how memory is managed)
  • can stream output

returning result

  • arguably simpler
  • allows you to further manipulate/use the returned result. EG if we are serializing to JSON (similar to Python’s JSON decoding operation), then if Foo holds a list of Bar objects, then we can implement Foo‘s toJSON method by:
def toJSON(self):     return {         #  other members here         "bars": [b.toJSON() for b in self.bars],     } 

Which wouldn’t be possible if toJSON accepted some sort of JSON sink.

Why has my Mac stopped accepting mouse clicks?

My Mac mini suddenly stopped responding to mouse clicks. The cursor moves around and I can switch applications with the keyboard but neither my magic trackpad or cheap USB mouse work for any type of click. As I move the most cursor along the dock icons are not ‘popping’ neither are any mouse hover actions seeming to work.

I never saw this before, what is going on? I don’t know how to use my Mac without a mouse so I’m a bit stuck!

Dove tailing questions about accepting language

$ L = \{M | \text { M is a TM and there exist some string w that contains five 1’s such that M halts}\}$

Where $ \Sigma =\{0,1\}$

let $ w_1, w_2, \cdots, \in \Sigma^*$ be an effective enumeration. We give a TM $ R$ that recognizes $ L$

R = "On input <M>     for s = 1 to infinity:         for i = 1 to s             run M on input w_i for s steps             if M halts on w_i within s steps then                 accept 

Can I assume $ M$ knows to halt only if there are five $ 1$ ‘s? Or do I need another if statement such as in line 4

if M halts on w_i within s steps then     if w_i.count("1") is 5 then         accept