Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Conntrack table memory usage

Discussion in 'Asuswrt-Merlin' started by Denna, Apr 20, 2017.

Tags:
  1. Denna

    Denna Senior Member

    Joined:
    Aug 4, 2016
    Messages:
    219
    @RMerlin,

    I've been looking at ways to minimize router resource usage caused by external Internet hosts.

    One of the ways to minimize CPU usage and conntrack table entries was to implement the following rule.

    Code:
    iptables -t mangle -I PREROUTING -i <wan_face> -m state --state NEW -j DROP
    On an Asus RT-AC88U, if you run the following command ...

    Code:
    sysctl net.ipv4.netfilter.ip_conntrack_max
    ... you get 300,000.

    Does that mean this router is configured with a maximum of 300,000 simultaneous connections ?

    If each conntrack entry is 350 bytes, doesn't that amount to more than 100 MB of memory usage ?

    Is that right ?​
     
    Last edited: Apr 20, 2017
  2. Denna

    Denna Senior Member

    Joined:
    Aug 4, 2016
    Messages:
    219
    @RMerlin,

    Is the above setting a typo or the expected value for Asuswrt / Asuswrt-Merlin ?​
     
  3. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    4,211
    Location:
    United States
    It's the normal default......you can change it on the Tools > Other Settings page.
     
  4. Denna

    Denna Senior Member

    Joined:
    Aug 4, 2016
    Messages:
    219
    @john9527,

    Thanks for the reply.

    Are 300,000 connections for a home router really necessary ?

    That's a lot of memory to be assigned to connection tracking.​
     
  5. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    4,211
    Location:
    United States
    IMHO, it's a great marketing bullet point, and nothing more. :)

    I think most of the memory is dynamically allocated, so that probably isn't a big concern. If you do a search, I seem to remember a thread that discussed the other potential performance impacts of using that large a value. Personally, I have it set to the kernel default, which on my system is about 30,000. If you look on the Tools > Sysinfo page, you can see the actual number of connections you are actually using.
     
  6. Denna

    Denna Senior Member

    Joined:
    Aug 4, 2016
    Messages:
    219
    What WebGUI is reporting now ...

    CNT.jpg

    Alert ! Alert ! I only have 299,866 available connections left !

    I seriously believe 300,000 max connections is a typo, because the CPU(s) need to support that many connections is probably not in this router. :eek:

    What application(s) could possible use that many connections - streaming, gaming ? By how many clients ?
     

Share This Page