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

learn more… | top users | synonyms (1)

3
votes
2answers
59 views

Tool to force use FILE instead of RAM

I'm wondering why there is no such tool like ram2swap, similar to cpulimit in parts. E.g. There is program daemon.bin. Let's create temporary swap file ( 1 Gb ): % dd if=/dev/zero of=tmp.swap ...
1
vote
1answer
43 views

how to determine the max user process value?

Which value is correct?(or they are all correct, but which one will take effect?) $ cat /proc/sys/kernel/pid_max 32768 $ ulimit -a |grep processes max user processes (-u) 77301 $ cat ...
3
votes
1answer
45 views

How to limit a user's RAM on Ubuntu? [duplicate]

I currently have a "friend" that has an account on my dedicated server which is running Ubuntu. Not getting into specifics, but he said he will use ~2gb max and he's using ~10gb. On to the question. ...
3
votes
1answer
425 views

Httpd : no space left on device

I am using Fedora 17 and over the last few days I am having an issue with my system. Whenever I try to start httpd it shows me: Error: No space left on device When I execute systemctl status ...
2
votes
2answers
33 views

Limitng number of process by name

is it possible, to limit number of process for given group or user using process name? Eg. I'd like to groups remotes have only 5 simultaneous ssh processes that are run on my server. I don't see any ...
3
votes
1answer
48 views

limiting a user's TCP transfer quota

I've been researching how to limit a user's monthly TCP download plus upload quotas. The total transfer limit is 1 TB / month . There are 50 users, so I wish to limit each user to a maximum of 20 GB / ...
1
vote
0answers
14 views

Find and close/unlink message queues in the system

I have a SLES-11 machine on which I am not the root where I am building software code that makes extensive use of message queues. Due to some bugs, Now have an error: mq_open: Too many open files I ...
1
vote
0answers
33 views

Which filter configuration in kernel rate limit the outgoing packets to 1packet/sec?

Which net filter in kernel configuration other than iptables enable rate limiting on the outgoing packets on ethernet port?
2
votes
1answer
38 views

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 ...
3
votes
3answers
62 views

Why are file handles a scarce resource?

I feel like every tutorial I read on resource management in server settings starts by asserting that file handles are a scarce resource, and we should therefore aim to keep the list of open files to a ...
6
votes
7answers
458 views

Make disk/disk copy slower

Is there a method of slowing down the copy process on Linux? I have a big file, say 10GB, and I'd like to copy it to another directory, but I don't want to copy it with full speed. Let's say I'd like ...
6
votes
1answer
82 views

Do processes in cgroups have to be set every boot? If so, how to persist them?

I was reading this answer to a question on setting limits for processes by using cgroups. The sample given sets limits for a process (in the example, sshd). In the answer, the PID of the process is ...
2
votes
1answer
92 views

Control Dropbox upload rate on the command line

I'm using Dropbox without the GUI in Linux. I would like to limit the upload rate, sometimes large files eats my internet bandwidth. Anyone knows how I do that?
13
votes
6answers
4k views

Is there a way to limit the amount of memory a particular process can use in Unix?

I need to test a process for memory management. I do not have the source, so I need to do all the testing from the OS side. I want to be able to say something like limitmemory 400k -p <pid> ...
1
vote
1answer
54 views

Is the Linux implementation of the system configuration “variable” ARG_MAX different from other system variables and is it POSIX compliant?

In the shell, as explained in this this Q&A in the context of expansion, depending on the system, the maximum length of a command's argument is initially constrained by the kernel setup. The ...
2
votes
1answer
66 views

How does one determine the amount of space allocated to their command line?

How would one go about determining the amount of space allocated to their system for command lines. Is there anything else I need to be concerned with?
3
votes
3answers
2k views

do changes in /etc/security/limits.conf require a reboot?

do changes in /etc/security/limits.conf require a reboot before taking effect? Like if I have a script that sets the following limits in /etc/security/limits.conf, does this require me to reboot ...
2
votes
3answers
516 views

limiting size of logfile from a variable

How can I limit the size of a log file, which is saved in the form of 'foo.txt', from within a bash script please? I want to put in the variables 'LOGFILE=50 mb' and it uses that size, or whatever ...
11
votes
2answers
804 views

Is there an upper limit to the number of zombie processes you can have?

I used to work with an HP-UX system and the old admin told me there is an upper limit on the number of zombie processes you can have on the system, I believe 1024. Is this a hard fact ceiling? I ...
1
vote
1answer
220 views

Error: permission denied on key 'fs.file-nr'

# sysctl -w fs.file-nr=131072 error: permission denied on key 'fs.file-nr' Same issue when I edit /etc/sysctl.conf and try sysctl -p. Any reason why I cannot edit this value? I am on CentOS 6.5
4
votes
2answers
208 views

Does OpenBSD have a limit to the number of file descriptors?

What's the maximum number of file descriptors that a process can get on OpenBSD successfully? For example, there is an openfiles limit in login.conf(5) in OpenBSD. If I want to have as many file ...
2
votes
0answers
72 views

Limit CPU cycles inside of Xen

I'd like to run some minimum-expectation benchmarks on EC2, but I'm having an issue of high variability in my output data. Specifically, they keep giving me more CPU than I'm minimally entitled to, ...
16
votes
3answers
8k views

Why is number of open files limited in Linux?

Right now, I know that: Find open files limit per process: ulimit -n Count all opened files by all process: lsof | wc -l Get maximum open files count allowd: cat /proc/sys/fs/file-max My ...
1
vote
0answers
91 views

JVM memory limit on Linux (Debian)

When running my java program, I get following error: Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit I am wondering how I can increase the limits on my ...
9
votes
2answers
4k views

How to Throttle per process I/O to a max limit?

I'm looking for a way to limit a processes disk io to a set speed limit. Ideally the program would work similar to this: $ limitio --pid 32423 --write-limit 1M Limiting process 32423 to 1 megabyte ...
5
votes
2answers
167 views

How can I allow a user to prioritize a process to negative niceness?

I want a user to run a specific process on the system with a negative nice value. I can't simply fork the process to background as this specific program is a minecraft server and I rely on the command ...
2
votes
1answer
61 views

starts logging when the limits are hit

/etc/security/limits.conf. The file is responsible to limit resources of users/groups on a Linux server. Unfortunately, the file does not generate any logs (or the case could be that I do not really ...
13
votes
2answers
14k views

Limit process to one cpu core

How to limit process to one cpu core ? Something similar to ulimit or cpulimit would be nice. (Just to ensure: I do NOT want to limit percentage usage or time of execution. I want to force app (with ...
4
votes
2answers
176 views

Externaly limiting number of CPU cores used

I need to externally limit a process/session to a certain number of cores. Are there any other possibilities than CPU affinity (I don't like the need to specify the actual cores) and cgroups (hard to ...
2
votes
0answers
130 views

Traffic shaping with tc does not work

I want to limit the outgoing traffic to a specific bandwidth. My Code: tc qdisc add dev vif1.0 root handle 1: htb default 30 tc class add dev vif1.0 parent 1: classid 1:1 htb rate 1mbit tc class add ...
3
votes
3answers
604 views

Can't add large number of rules to iptables

I made a very simple bash script (echo at start, runs commands, echos at end) to add approx 7300 rules to iptables blocking much of China and Russia, however it gets through adding approximately 400 ...
1
vote
0answers
69 views

Limiting the total size of samba's vfs_recycle by pruning oldest deleted files first

Running SerNet Samba 4.0.9 on CentOS 6.4 serving as an AD DC and fileshare for XP clients. Added recycler per the example here. My concern is that the recycle dir will eventually grow large. ...
0
votes
1answer
107 views

No virtual memory (-v) item in output of ulimit -a

When I run command ulimit -a, I see no virtual memory item in the list of output of the command. It is unlimited for some user IDs though. Does that mean I am assigned no virtual memory?
4
votes
1answer
865 views

How to circumvent “Too many open files” in debian

If I want to see all relevant log files of my apache2 server at once, I use tail -f /var/kunden/logs/*log /var/kunden/logs/*log /var/log/apache2/*log |grep -v robots|grep -v favicon But since those ...
5
votes
2answers
427 views

Does linux kill heavy and long running background processes after they reach some threshold?

If I start a really heavy (memory/cpu intensive) running really long running process will the OS terminate it after a period of time arbitrarily? I.e. are there any limits beyond which the OS would ...
5
votes
1answer
1k views

Are limits.conf values applied on a per-process basis?

I'm tuning the nofile value in /etc/security/limits.conf for my oracle user and I have a question about its behavior: does nofile limit the total number of files the user can have open for all of its ...
2
votes
1answer
1k views

sudo: ulimit: command not found

I was using ubuntu 12.04 ,on which I run ulimit -n ,it is showing 1024, I want to increase my open file limit from 1024 to 65535,so I tried the following command: sudo ulimit -n 65535 but i get the ...
4
votes
2answers
807 views

What is “automatic stack expansion”?

getrlimit(2) has the following definition in the man pages: RLIMIT_AS The maximum size of the process's virtual memory (address space) in bytes. This limit affects calls to brk(2), mmap(2) and ...
0
votes
5answers
1k views

SSH login attempts per minute per IP

How can i limit SSH login attempts per minute per IP ? I want to disable login attempts during 5 seconds after a failure. Is this possible ? I'm not talking about ban a user after parsing logs like ...
20
votes
3answers
1k views

Can the “du” program be made less aggressive?

We have a regular job that does du summaries of a number of subdirectories, picking out worst offenders, and use the output to find if there are things that are rapidly rising to spot potential ...
4
votes
1answer
3k views

Modify ulimit (open files) of a specific process

Is it possible to change the soft - and hard limit of a specific process? In my case, my process is mongod and a lot of web resources tell me to simply execute: ulimit -n <my new value> My ...
12
votes
3answers
2k views

Can I limit a process to a certain amount of time / CPU cycles?

We have a script which runs on our web servers, triggered by customer action, which initiates a unix process to generate some cache files. Because this process acts upon files supplied by our ...
5
votes
1answer
1k views

How many users does Linux support being logged in at the same time via SSH?

I know Linux supports multiple users being logged in at the same time. But what's the maximum number of users that can be logged into Linux at the same time? I see there are there are 69 tty files ...
8
votes
6answers
2k views

How do I set a limit on the number of files Linux can have open?

I plan to run a Java app using nohup ... &. The limit must apply to commands like this.
1
vote
2answers
93 views

understanding how to run script securely as limited user

I'm a long time dev but linux newbie. I've been building this (http://tryperl.com) to learn linux. So, my question is just about some *nix stuff I don't fully grok. One of the things I want to do is ...
6
votes
1answer
400 views

How to solve this memory issue gracefully?

I have a standard Linux (Debian testing) laptop, with a swap partition. I do a lot of experiments with it. Some of them are really memory hungry and the way Linux behaves by default is an issue for ...
2
votes
0answers
102 views

Can I limit the number of inotify watches available to a process or cgroup?

I am consistently running out of inotify resources, leading to errors along the lines of: # tail -f /some/files tail: inotify resources exhausted tail: inotify cannot be used, reverting to polling ...
3
votes
1answer
241 views

Can I limit connections per second for certain UserAgents using UFW?

GoogleBot is hitting my server hard - and even though I have set the CrawlRate in Webmaster Tools it is still hiking up the load on my server and slowing down Apache for the rest of the normal web ...
1
vote
1answer
7k views

How to modify ulimit for open files on SUSE Linux Enterprise Server 10.4 permanently?

SERVER:/etc # ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 96069 ...
1
vote
1answer
493 views

How to avoid 4 core limit for Ubuntu within VMWare?

I have Ubuntu installed as VM on my laptop. My laptop has quad core with HT technology making it 8 cores. Within Ubuntu VM I can only use max of 4 cores. What should I do so I can access all 8? ...