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)

21
votes
2answers
32k views

How to create a user with limited RAM usage?

So I have 4 GB RAM + 4GB swap. I want to create a user with limited ram and swap: 3 GB RAM and 1 GB swap. Is such thing possible? Is it possible to start applications with limited RAM and swap ...
0
votes
0answers
28 views

access denied for folder in NFS share possibly for new users only. Why? [closed]

On a one of our NFS filers, a user is unable to access the folders having group ownership and permissions. $ id -a uid=3234243(user1) gid=18027(sv_users) groups=18027(sv_users),18606(lts) $ls -ld /...
56
votes
3answers
72k 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
2answers
48 views

ulimit command not found (without sudo) and error - coredumpsize: Can't set limit (Operation not permitted)

When i initially login to a server, I see the following error message. ullimit: coredumpsize: Can't set limit (Operation not permitted) Further, when I try to copy files into this machine, I see ...
67
votes
5answers
121k 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 ...
1
vote
2answers
343 views

cpulimit on a bash script which runs other commands

I have a bash script which runs other cpu-intensive commands . When I apply cpulimit on the bash script, the output of top shows processes for the commands inside the script still run without ...
2
votes
0answers
27 views

Limiting users ram with cgroups not working (for me)

I registred because I didn't manage running cgroups with several tutorials/comments/whatever you find on google. I want to limit the amount of ram a specifix user may use. Internet says "cgroups". My ...
1
vote
0answers
18 views

How to decrease speed/priority of file transfer (graphical)?

I regularly have big transfers of files running between two local hard drives, and at the same time some network transfers through my Internet browser. The problem is that the local transfer seems to ...
5
votes
3answers
108 views

How can I tell which user limit I am running into?

Multiple sessions of the same user. When one of them gets to the point that it can no longer run new programs, none of them can, not even a new login of that user. Other users can still run new ...
8
votes
1answer
3k views

Throttling web crawlers

My website is being DoS'ed by Google webspiders. Google is welcome to index my site, but sometimes it is querying a tagcloud on my site faster than my webserver can produce the results, making my ...
9
votes
2answers
2k 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 ...
3
votes
0answers
31 views

Is it bad to have thousands of autofs rules?

My company literally has thousands of NFS volumes, which we need to mount on a few of our servers. However, we never mount all of them at the same time; typically we mount about 12 at a time. Most of ...
6
votes
1answer
317 views

Limit the inode cache used by a command

I want to run a task with limits on the kernel objects that they will indirectly trigger. Note that this is not about the memory, threads, etc. used by the application, but about memory used by the ...
0
votes
1answer
99 views

How “Max open files” soft and hard limit are set for specific process?

I used the cat /proc/<pid>/limits command to check the Max open file hard and soft limit, but I want to know how this value will be set and can it be increased or decreased? Is this value is ...
0
votes
1answer
17 views

Proftpd classes don't work

If setup my proftpd server and all is working fine on 'full' speed. but I want to limit a certain IP range to a speed limit. So I've added the following lines to the proftpd.conf file: <Class ...
0
votes
2answers
45 views

File Size Limit

What is the maximum file size limit in rhel 32 bit OS, is there any OS limitation for the file size , if there is any limitation set then please tell me what will be for root & oaa.
24
votes
6answers
30k views

How do I limit the number of files printed by ls?

Is there a way to limit the quantity of listed files on a ls command? I've seen: ls | head -4 but to get head or tail to be executed I need to wait for ls to finish execution, and with directories ...
5
votes
3answers
14k 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 ...
1
vote
1answer
2k 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 ...
0
votes
0answers
131 views

How does WonderShaper Work?

I'm trying to limit bandwidth download/upload for my server (Centos 6.7). I had read some documents and these are suggest that I should use WonderShaper. So i had installed and tried but it has a ...
0
votes
0answers
54 views

CUPS limit pages per job

I am searching for a way to use Linux as a printer-server and i need to be able to limit the pages per printjob. So i for example want a maximum of 5 pages per job. No quota for a user or a timespan. ...
0
votes
1answer
42 views

`cpulimit` and `nice` not effective in limiting the cpu usage of a python program that contains heavvy computations using theano

I am running a program written in python that makes heavy computations using theano. As it is a very CPU-intensive program, it is disrupting all my other activies on my laptop. For this reason I ...
1
vote
1answer
51 views

How to handle broken link after file deletion.in /proc/<pid>/fd directory?

A process is creating huge number of log files and also deleting it. Many of those deleted files are having broken links in the /proc/pid/fd directory. Do these file handles need to be closed by ...
3
votes
2answers
1k 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?
2
votes
1answer
231 views

Chrome/Chromium crashes (“Aw, snap!”, segfault): “Resource temporarily unavailable”

Chrome/Chromium won't load any websites and just shows the "Aw, Snap! Something went wrong..." page. Some sub-processes segfault. When started in a Terminal, it will shows lots of these: [......
20
votes
3answers
926 views

Limiting a specific shell's internet bandwidth usage

I want update my linux in one shell but by default wget or axel in updater use all the bandwidth. How can I limit the speed in this shell? I want other shells to have a fair share, and to limit ...
1
vote
2answers
66 views

What is the default memory allocation for shell process by linux

What is the default memory allocation for shell process by Linux , i mean is there any upper limit for shell process or any process.
1
vote
0answers
43 views

getpriority returning different value on different hosts with same kernel version

I am running centos 6.6 on same type of hardware with kernel version "2.6.32-504.30.3.el6.x86_64" Has anybody seen this why the below code when compiled and executed gives a different value on two ...
2
votes
0answers
764 views

File descriptor limits in /etc/system vs /etc/sysctl.conf vs /etc/security/limits.conf on Solaris

Let me explain first what I understood. In Solaris 10, rlim_fd_max and rlim_fd_cur in /etc/system set the hard and soft limits at the system level. And /etc/security/limits.conf sets the limits for ...
5
votes
1answer
65 views

Can I set a resource limit for the current process tree?

Let's say I'm running on a resource-constrained system, and I want to ensure that the applications I run open no more than 10 files total. If I try to do it using setrlimit, something like: if (fork(...
0
votes
0answers
115 views

IPTables if more than 30 connection in 1 minute ban IP for 1 hour?

I am trying to setup a firewall that limits to 3 connections per IP and also ban the IP for an hour if > 30 connection attempts in one minute. Is this all possible with iptables? So far I have only ...
16
votes
3answers
16k 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 ...
1
vote
1answer
154 views

How can I use arptables to limit the number of outgoing ARP requests a second?

End goal: Make a script that will limit the number of outgoing ARP requests in a second using arptables. This is to have the ability to not trip the ARP-limiting feature on Cisco devices. I want to ...
0
votes
0answers
17 views

Is it possible to have an IPA user/group in both security limits and nproc limits

I am planning to deploy cassandra to a set of Red Hat 6.7 machines but there was an additional requirement to use IPA user for the cassandra user. For the cassandra user we usually do some ...
9
votes
3answers
8k views

ulimit PICKLE: “Operation not permitted” and “Command not found”

I'm trying to increase the maximum number of open files for the current user > ulimit -n 1024 I attempt to increase and fail as follows > ulimit -n 4096 bash: ulimit: open files: cannot ...
10
votes
2answers
11k views

sudo: ulimit: command not found [duplicate]

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 ...
13
votes
7answers
5k 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 ...
4
votes
1answer
1k views

How do you increase MAXSYMLINKS

In a python script, I am creating a bunch of symbolic links chained together. example: link1->link2->link3->.......->somefile.txt I was wondering how you can change the max number of symlinks to be ...
1
vote
1answer
230 views

Why lsof reports a higher number of open files of user than what ulimit says should be allowed?

I have checked the result for user kpiserv [kpiserv@***** ~]$ lsof -u kpiserv |wc -l 5358 [kpiserv@***** ~]$ ulimit -a open files (-n) 1024 Why lsof reports a ...
5
votes
1answer
2k 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 httpd....
6
votes
3answers
486 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 ...
3
votes
1answer
198 views

How to limit speed of file copy?

I am copying huge file from NFS mount using dd: dd if=/mnt/nfs/image.img of=/dev/sda I need to limit the speed of reading from NFS. How can I achieve it? The only precondition is to use some easy ...
0
votes
1answer
65 views

Relationship between limits.conf and LDAP?

This seems like a straight forward question: Is there a relationship between the groups defined in ldap ldif files and /etc/security/limits.conf ? I.e., does defining an LDAP user with ou=...
3
votes
1answer
553 views

Linux cgroups: limit CPU usage in absolute values which do not depend on CPU speed

I have a server with a 2.4GHz processor. And there are several cgroups, each one allowed to use 25% of CPU. That's equal to 600MHz. Then I replace the CPU with a faster one, let's say 3.0GHz. If I ...
4
votes
1answer
4k 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 ...
1
vote
1answer
31 views

Does loginuid have any impact on process limits?

On CentOS/RHEL 6, when I start my daemon as root user, I see /proc/<pid>/loginuid of the process as 0 and when I start it through sudo, I see loginuid of the sudo user. Even if I do sudo su - ...
1
vote
1answer
47 views

Restricting CPU time of processes by executable path

Is there a way to restrict CPU time (duration) for all processes which are invoked by executables that are located in a certain directory? I would like to be able to auto-kill all applications which ...
7
votes
1answer
2k views

/dev/mmcblk0 partitions limit

I've just mounted a microSD card which has 17 partitions in my laptop and I'm getting the following error in the YaST partitioner: Your disk /dev/mmcblk0 contains 17 partitions. The maximum number of ...
1
vote
0answers
59 views

How can I define time limit to a user's group per session

I have the group ABC and I need to configure a time-limit to 2min per session for its members. Like a TMOUT is only for a user, but I need for a group). How can I define time limit to a user's group ...
0
votes
2answers
88 views

Is there a way to rate-limit an rsync user?

I have a user with a Shell account(with jailkit) that insists on rsyncing 500gb of data on a daily basis. Is there a way to limit that rsync to say just 2mbits per sec? If I have to do it by IP, how ...