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
1answer
36 views

Different between `ulimit -e` and `renice`?

I would like to run a backup script in low CPU and disk I/O. Is there any different between this: #!/bin/bash ulimit -e 19 ionice -c3 -p $$ and this: #!/bin/bash ionice -c3 -p $$ renice -n 19 ...
4
votes
1answer
119 views

FILE size limitation according to Robert Love's textbook

From Robert Love's Linux System Programming (2007, O'Reilly), this is what is given in the first paragraph (Chapter 1, Page 10): The file position’s maximum value is bounded only by the size of ...
2
votes
2answers
25 views

centos5 maximum memory setting for all users

I'm using Centos5 for operating server and the machine has limited memory. There are many users using the server and some of them are running programs which use a lot of RAM. When I check the used ...
6
votes
0answers
32 views

Limit on the number of btrfs snapshots?

I am considering using btrfs on my data drive so that I can use snapper, or something like snapper, to take time based snapshots. I believe this will let me browse old versions of my data. This would ...
1
vote
0answers
33 views

Is there a limit of GPIOs that can be used in Linux?

When it comes to use GPIOs, is there a limited number that can be used in Linux (except through the limitation of the physical availability/amount of the ports/pins) or is it theoretically possible to ...
7
votes
3answers
161 views

Limit max connections per IP address and new connections per second with iptables

We have an Ubuntu 12.04 server with httpd on port 80 and we want to limit: the maximum connections per IP address to httpd to 10 the maximum new connections per second to httpd to 150 How can we ...
8
votes
1answer
214 views

How to limit the total resources (memory) of a process and its children

There are plenty of questions and answers about constraining the resources of a single process, e.g. RLIMIT_AS can be used to constrain the maximum memory allocated by a process that can be seen as ...
1
vote
2answers
41 views

Why does it temporarily look like the pv command transfer limit is no longer enforced when I come out of suspend to ram?

I have this perl script and I discovered the pv command and decided to use it to get some feedback into what is going on with the randomness in terms of throughput. After a few tests1 I decided to ...
1
vote
1answer
57 views

What are the effects of increasing hard and soft limits for ldap user

I've been having some instability issues with my LDAP server. I have ~2000 machines connecting to it. Using netstat -pant | grep slapd, I can typically see 1500+ connections from the clients to the ...
1
vote
0answers
27 views

How to limit network bandwidth after some data transferred?

So the question is in the name of topic. How to limit bandwidth I know. Using tc. But how to do so after, for example, traffic had reached 500MB. And after some time reset the limits.
2
votes
3answers
119 views

Is there a way to make your process use less CPU?

I want my device to use less CPU to save battery. I have a program that uses a large amount of it. nice won't help as all it does is change scheduling when CPU is at %100, while I don't want it to get ...
1
vote
1answer
141 views

How to configure the process open file limit of a user?

The default open file limit per process is 1024 on - say - Linux. For certain daemons this is not enough. Thus, the question: How to change the open file limit for a specific user?
3
votes
1answer
85 views

Increasing nproc limit for a non-root user . Only effective by restart

I am increasing nproc limit for one of a development user account in my rhel6 system . After searching some rubust solution , I zerod at editing /etc/security/limits.conf with these two lines : ...
2
votes
3answers
120 views

Number of SSH connection(s) on a single linux machine

I landed up in a situation wherein I had to access a Linux machine via puTTY.I made various attempts to SSH but failed to connect to the machine. I then realised my colleague was accessing the same ...
2
votes
2answers
76 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
169 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
65 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. ...
2
votes
2answers
44 views

Limiting number of processes by name

is it possible to limit number of processes for a given group or user using the process name? Eg. I'd like to groups remotes have only 5 simultaneous ssh processes that are run on my server. I don't ...
3
votes
1answer
86 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
43 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
73 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
188 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
80 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
1answer
102 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 ...
6
votes
7answers
588 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 ...
3
votes
1answer
216 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?
1
vote
1answer
112 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
76 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?
6
votes
3answers
10k 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
1answer
414 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
366 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
87 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, ...
1
vote
0answers
150 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 ...
5
votes
2answers
292 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
0answers
181 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 ...
2
votes
1answer
66 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 ...
1
vote
0answers
92 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
128 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?
5
votes
2answers
493 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
2k 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 ...
2
votes
1answer
2k 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 ...
3
votes
3answers
755 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 ...
0
votes
5answers
2k 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 ...
4
votes
2answers
185 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 ...
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
2answers
5k 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 ...
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 ...
1
vote
2answers
108 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 ...
3
votes
1answer
525 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 ...
9
votes
2answers
523 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 ...