Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

5
votes
1answer
62 views

dash maximum variable length under systemd

I have a shell script that uses a single variable as an associative array (one KEY=VALUE per line). Throughout the execution of the script, the variable is manipulated to add, remove or modify ...
4
votes
1answer
1k 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
1answer
762 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 / ...
2
votes
1answer
95 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
1answer
1k views

Curl parallel download file list

first post sorry if I did some mess here =) Using Ubuntu 14.04lts 64bits server version. I have a list (url.list) with only URLs to download, one per line, that looks like this: http://domain.com/...
1
vote
1answer
236 views

Difference between behaviors of setrlimit and limit stack

I am seeing a difference of behavior when setting stack size from shell and from inside my c program. The issue is that I have a function which has a large set of local variables (large arrays). If I ...
1
vote
1answer
1k views

iptables limit inbound connections to Docker container

Running an Ubuntu 16.04 server with Docker Engine (latest version 1.12.1) and a Docker image/container based on Ubuntu 16.04 as well. I need to limit (on a specific port using TCP) both: the number ...
1
vote
1answer
127 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
741 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
1answer
244 views

Download error with youtube-dl and axel

I am trying to download following video: https://www.youtube.com/watch?v=pQWj2Fgxdrc by combining 'youtube-dl' and 'axel'. I am trying to download this video in such a way that I want these two ...
0
votes
1answer
340 views

Limiting RAM for a group of users on Ubuntu Machine

I have a gpu based system. Multiple users use the system, as a result, the RAM frequently gets fully utilized leaving no memory for myself. I want to put a maximum RAM limit on all the users except ...
0
votes
1answer
834 views

RHEL setting a user specific max number of open files

I've set up below values in /etc/security/limits.conf in my RHEL machine. * hard nofile 65535 @student hard nofile 100000 Is this the correct approach when setting a user specific max number of ...
0
votes
1answer
472 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
0answers
304 views

Limiting per process dirty bytes without slowing down the whole system

Given a busy system with a really fast block device (highend NVMe raid, 2 GB/s write, 4 GB/s read) mounted at /data and an a really slow device (USB HDD with spinning 8 TB disk, 50 MB/s write, 60 MB/s ...
3
votes
0answers
552 views

Trickle not behaving as expected

I'm using Ubuntu Trusty 14.04 64 bits. I've installed trickle network shaper from repositories and I performed some tests: No limits I executed this command to test somehow my network download ...
2
votes
0answers
119 views

Restart a process if cpu usage is more than 90% for more than a 60sec

Normally one of my systemd services will take about 0...5% cpu Usage. In some cases it can reach up to 100% but only for some seconds. If the Service "crashes" it takes up to 100% continuously. So I ...
2
votes
0answers
319 views

scp : -l option (bandwidth limiting) doesn't work when scp-ing from a remote server to another remote server

If I do : $ scp -l 1024 remote1:/path/to/file remote2:/path/to/destination I can see, using nload on remote1, that the bandwidth used by scp isn't limited to 1024 kbits/s like I thought. I found a ...
2
votes
0answers
99 views

How to check usage of mqueues reliably?

I run a testing server for a software that depends on the massive usage of mqueues (POSIX messages queues). I increased limits to a reasonable level and got it working a long time ago. However, the ...
2
votes
0answers
161 views

How to report current usage for a user on ulimits aka pam_limits etc?

Every SA sooner or later runs into a user hitting a ulimit like open files or number of processes. There must be a simple mechanism to track and test against usage of these limits, or ulimits would ...
2
votes
0answers
110 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 ...
2
votes
0answers
4k views

File limits getrlimit(RLIMIT_NOFILE) failed

(32-bit system) Posted a Q/A earlier regarding Chrome crashing because of exhausted limit in open files. Chrome has since run more smooth, (after increasing limit), but still crashes from time to ...
2
votes
0answers
292 views

Can I control number of TCP Connections per second in curl?

I am trying to make one traffic generator tool in linux centOS 6.5. I am using curl for this purpose. I can generate traffic from virtual interfaces using curl but I don't know if I can control number ...
2
votes
0answers
4k views

Increasing ulimit stack size benefits?

Hello I'm new in Linux and at my work I have a server that runs a banking software. The company that made the software said that the stack size should be set to unlimited. Does this make the software ...
2
votes
0answers
131 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
0answers
677 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 ...
2
votes
0answers
226 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, ...
2
votes
0answers
107 views

equivalent to 'cpusets' for gpu's

I work with clusters of computers and manage the nodes with torque and Moab. A user is able to submit a job to a node, and request the amount of resources they need. #The following submits the job ...
2
votes
0answers
285 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 ...
2
votes
0answers
2k views

Permanently change per-process stack size

When I use ulimit -s to change the per-process stack size, it only lasts for that login; if I restart the setting is lost. How can I permanently change the maximum stack size on my system?
1
vote
0answers
28 views

Limit container resources both using --memory and --cgroup-parent

I'd like to limit both total memory consumption for a group of containers as well as memory consumption for a particular container. Say, a container is allowed to consume not greater than 1Gb and all ...
1
vote
0answers
15 views

Launch a program to only specific resources

Question: How can I launch a program such that it only uses X ram and Y CPU cores, etc? I happen to be using Ubuntu in this case, but since I often am on other distros, I need a general GNU/Linux ...
1
vote
0answers
191 views

What is the maximum open files limit?

I'm working on a reasonably large project, and recently had to bump the nofile setting above 500,000. I tried to change it to five million in /etc/security/limits.d/99-users-nofile.conf, but ...
1
vote
0answers
147 views

Where does a bash process get its default signal handlers/traps?

From https://stackoverflow.com/questions/50606753/do-getrlimit-and-setrlimit-work-by-reading-from-and-writing-to-etc-sec#comment88227414_50607042 Bash doesn't have a special handler for SIGQUIT ...
1
vote
0answers
65 views

Using a large number of nullfs mounts to create a virtual FS on FreeBSD - what are the practical limits + impacts?

I have a situation where I'm possibly going to create a virtual file system on FreeBSD, comprised entirely of nullfs mounts of selected "ordinary" dirs within my various ZFS datasets (and their ...
1
vote
0answers
156 views

How to check the shell of a running process?

I am working on Solaris 11 zone and I need to check which shell a running process is using. I have the PID but I am not sure where to get the information from. I have a scenario where some resource ...
1
vote
0answers
167 views

how to let aufs use more than 127 layers? or an alternative to it

I came to the conclusion that aufs is limited to 127 layers based on tests. (prepare) mkdir write joined {1..400} for((i=1;i<=400;i++));do echo >$i/$i.txt;done #for checks using a single ...
1
vote
0answers
143 views

is cgroups limits per user or shared across all members?

for example, group memlimit { memory { #approx 200MB memory.limit_in_bytes = 200000000; } } will all members of memlimit share 200 MB, or will each member individually get ...
1
vote
0answers
109 views

How to restrict swap space usage of application

We have a Java application hosted on (jetty server) running on CentOS machine. Every second the application will handle thousands of websocket connections which will get opened and closed again. Also ...
1
vote
0answers
54 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 ...
1
vote
0answers
119 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 ...
1
vote
0answers
104 views

icmp limited in many network spaces?

I wrote small script do show example usage of ip netns on unused class size C (here changed into 192.168.10) #!/bin/sh network=192.168.10 for id in `seq 0 127`; do ip netns del test-$id; done; ...
1
vote
0answers
66 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 ...
1
vote
0answers
458 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?
1
vote
0answers
654 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 ...
1
vote
0answers
377 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
0answers
290 views

Limit directory size in a Docker container

I have a web application in a Docker container. I need to limit maximum size of some of its directories. When I was not using Docker, I just created disk partitions of the limit size and put those ...
0
votes
0answers
98 views

CentOS 7 tweaking sshd config to access the machine no matter how busy its

When CentOS 7 free memory goes below 200 MB, it become unresponsive even to ssh connection. Currently I have many machines not accessible remotely in peak time due to free memory being between 80 MB ...
0
votes
0answers
475 views

Kill the process and restart server when memory is exceeded - bash and cron

I have a site on webfaction, using django and python. However, I have problem with memory. The problem arises, because I use external library, that can run forever (consuming much time and memory). ...
0
votes
0answers
332 views

CentOS limits.conf & cpulimit not working

I have a CentOS server I am testing things out on. In it, I have configured USERNAME hard maxlogins 4 USERNAME hard cpu 1 USERNAME hard nproc 10 in /etc/security/limits....
0
votes
0answers
1k views

How to check number of connections

My server have high loads. CPU usage is low. Memory usage is low. IO is low. So I improve maximum number of connections in cpanel. Things are working. However, where can I see detail? How do I ...