How to Increase Number of Open Files Limit in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Marin Todorov

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

4 Responses

  1. nag says:

    Thanks for sharing information nice.

  2. Jalal Hajigholamali says:


    Thanks for very nice & useful article

  3. Marin Todorov says:


    You are correct, but still I would like to clarify that per systemctl’s manual the following files are read:

    Load settings from all system configuration files.

    So practically /etc/sysctl.conf is still read.

  4. Idir says:

    This way of increasing the open files limit is not reliable anymore, you need to create or edit a file in /usr/lib/sysctl.d/**.

    Although if you need to optimize a web-server, you are probably going to need to edit :

    kernel.pid_max = 65536
    net.core.netdev_max_backlog = 8192
    net.ipv4.tcp_syncookies = 0
    net.core.somaxconn = 8192
    net.ipv4.tcp_max_syn_backlog = 8192 
    net.ipv4.ip_local_port_range  = 1024 65535
    net.ipv4.tcp_tw_recycle = 1
    net.ipv4.tcp_tw_reuse = 1

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?