Tagged Questions

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)

1
vote
0answers
15 views

does sudo always set process limits to the numbers from /etc/security/limits.d?

I have observed the following behavior: [ec2-user@ip-10-66-68-55 ~]$ uname -a Linux ip-10-66-68-55 3.4.103-76.114.amzn1.x86_64 #1 SMP Fri Sep 12 00:57:39 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux ...
2
votes
2answers
83 views

set packet rate limit via iptables

I have a packet rate limit (max. 10 per seconds) which is set by my internet provider. This is a problem if I want to use the AceStream player, because if I exceed the limit I get disconnected. How ...
3
votes
1answer
109 views

What are the bash shell length limitations for here-docs?

What are the length limitations for using here-docs as part of bash command lines? I am finding that short here-docs work fine, but when they get longer there is some point or structure after which ...
2
votes
1answer
54 views

How to change the kernel max PID number? [duplicate]

The default PID max number is 32768. To get this information type: cat /proc/sys/kernel/pid_max 32768 or sysctl kernel.pid_max kernel.pid_max = 32768 Now, I want to change this number... but I ...
1
vote
1answer
82 views

Daemon's open file limit is reached even though the system limits have been increased

I am running Debian wheezy. File limits are increased to 100000 for every user. ulimit -a and ulimit -Hn / -Sn show me the right amounts of maximum open file limits even in screen. But for some reason ...
1
vote
2answers
40 views

Increasing stack size in 64 bit Cygwin? (installing ocaml)

I'm trying to set up an older version of ocaml, and I'm getting an error message that says that I need to increase my stack size. The only way I've found to do this in cygwin involves running an ...
2
votes
2answers
64 views

cpulimit does not detect Node.JS process

I was able to limit python process to use only 50% CPU with the following cpulimit -l 50 -e python but when I tried to do the same for Node, and it is not able to detect the process at all. Does ...
5
votes
4answers
1k views

Limiting processes to not exceed more than 10% of CPU usage

I operate a Linux system which has a lot of users but sometimes an abuse occurs; where a user might run a single process that uses up more than 80% of the CPU/Memory. So is there a way to prevent ...
3
votes
1answer
62 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
130 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
37 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 ...
9
votes
1answer
98 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
38 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
2k 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
298 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
50 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
270 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
40 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
268 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
456 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
227 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
2answers
631 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 ...
3
votes
2answers
95 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
651 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
94 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
58 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
120 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
77 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
93 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
489 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
94 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
122 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 ...
7
votes
7answers
842 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
362 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
161 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
86 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?
10
votes
3answers
20k 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
578 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
485 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
100 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
186 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
402 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
225 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
71 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
116 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
182 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
577 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 ...
6
votes
1answer
3k 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
1k 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 ...