top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Is there a limit of max number of files opened by a process in the Linux environment?

+2 votes
843 views
Is there a limit of max number of files opened by a process in the Linux environment?
posted May 17, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+2 votes

Yes,there is limit of max number of files opened by a process in the linux environment because of memory.Memory is limited resource in any system and OS needs memory to manage each opened file and also it is important for security purpose that if there is no limit then user will create endlessly files until server goes down.

answer May 18, 2016 by Shivam Kumar Pandey
Thank you :)
And this limit is depend on the memory (Ex: 2 GB or 4 GB), Correct?
yes .
+1 vote

yes, there is a limit of max number of files , because
The reason is that the operating system needs memory to manage each open file, and memory is a limited resource - especially on embedded systems.

As root user you can change the maximum of the open files count per process (via ulimit -n) and per system (e.g. echo 800000 > /proc/sys/fs/file-max).

answer May 18, 2016 by Hasan Raza
Similar Questions
+4 votes

Lets assume I have a system with RAM of 1GB. and virtual memory is 500MB. That brings to 1.5GB i.e. 1500 MBytes.

I have read somewhere that when I process is created stack of 8MB is associated to that process. So, assuming that any of the process is not allocating any dynamic memory or anything, then does it mean that, Maximum number of process that i can create is 1500/8 and i.e. 187 Process.

Please clarify my understanding,

+2 votes

Which option is used in "ps" command to get the details on running threads associated to a process ?

...