Questions tagged [limit]

Limiting the usage of a resource (memory, disk space, CPU time, open files, network bandwidth, …) by a process or a group of processes.

A limit is a restriction on a program that prevents it from using more than a set amount of resources, such as memory, disk space, CPU time, open files, network bandwidth, etc.

The ulimit built-in of POSIX shells lets a user set limits on the shell process and the programs that it subsequently invokes. The set of supported resources varies depending on the shell and the operating system.

257 questions
10
votes
1 answer

Difference between ulimit -n and /proc/$PID/limits

In Linux, there is open file limit. I can use ulimit -n to see open file limit, which is 1024 default. Then I also can see per process open file soft/hard limit by looking at /proc/$PID/limits. I see soft = 1024 and hard = 4096. I am wondering what…
5
votes
1 answer

How to limit the running time of a program?

Sometimes when I write code I found that I made a stupid mistake and some loop takes almost all CPU time forever. Is there a way the running time of a program for example to 10 seconds in bash?
3
votes
1 answer

Is it possible to impose a minimum niceness on a specific user?

Is it possible to limit a specific user's processes to always run with a niceness of at least 15, say?
kjo
  • 15,339
  • 25
  • 73
  • 114
1
vote
1 answer

"Too Many Open Files" for Apache and java/tomcat. How to set per-process limits?

This problem has now appeared twice on my production Ubuntu machine running both a node server (tiny) and a Spring Boot Java server (the workhorse). The first time it happened, grinding my server to a halt I found the file /proc/sys/fs/file-max had…