{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiaoiniket7zwmvf2fpre2vlv6wasnmvqeqne53nan2qaw5ywshbvi",
    "uri": "at://did:plc:ornsbtmaufp6dx4zecjdtoon/app.bsky.feed.post/3mnmut3y7kqj2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreiagz4ggig6oziuvzkaa3qw5xuhluumkd45ugpvgvu5blkyzrbd6cm"
    },
    "mimeType": "image/png",
    "size": 37468
  },
  "path": "/post/26734867",
  "publishedAt": "2026-06-06T07:58:46.000Z",
  "site": "https://beehaw.org",
  "tags": [
    "Programming",
    "sacred_font",
    "0 comments",
    "https://github.com/bneils/PingStorm",
    "github.com/bneils/PingStorm"
  ],
  "textContent": "submitted by sacred_font to programming\n6 points | 0 comments\nhttps://github.com/bneils/PingStorm\n\nHello lemmings, I made a program to ping every IPv4 address and collect data on respondents. I am almost done, but I want feedback on things I should change or how I can improve my current record of 5,000 pings / second.\n\nI am currently aware that I need to properly parse the data I receive on the receive socket, since it’s possible the TTL router messages might be confused as replies. ICMP is used on networks to inform other machines of network problems.\n\nOne issue I’m aware of is the tuning that has to go into maximizing throughput while also avoiding a total system freeze. My code seems to spend too much time opening sockets that it leaves no room for the actual OS. My only fix currently is limiting the CPU time to the ping timeout I used.\n\nThe overall program works like this: It keeps a linked list / pool of task objects. All objects are initially in the “free list” and then when they become associated with a socket, they move to the “active list”. The program first checks for updated sockets with `epoll` which results in like 5% of sockets giving a response. It then closes any tasks that have timed out via linked list in O(1) each. The slow part is when it creates new sockets, since it doesn’t really know when to stop, besides when the non-blocking socket informs it that it would block. I implemented a time limit on sending that is currently the maximum of the ping timeout. To increase throughput it seems like I need to streamline how I send ICMP packets.\n\ngithub.com/bneils/PingStorm",
  "title": "Suggest improvements to my IPv4 ping census program"
}