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.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Limit bandwidth for outgoing/incoming with latency for specific port using TC

I'm trying to limit the incoming and outgoing bandwidth with latency through a specific port using TC but I can't get it to work 100%. I'm not sure if I've done it correctly. When I ping google, the ...
0
votes
0answers
37 views

ulimit Settings Unable to be Increased on Ubuntu 16.04

In order to try to increase the ulimit -n values to larger ones on a Ubuntu 16.04 system, I have made the following changes: Edited /etc/security/limits.conf to include * hard nofile ...
0
votes
0answers
15 views

Linux Directory Size Limiting

I have a FTP server with anonymous access for my local network. Here I have directories named with department names. I want to limit the directory sizes in respect to departments. /var/ftp/pub/ ...
0
votes
2answers
37 views

Stop specific processes from heating up my system's CPU

I have a process doing some computation the whole time. It causes my system's CPU to heat up and the fan to spin faster. I want this process to run, but with a low priority. I don't want my system to ...
0
votes
0answers
39 views

“Too Many Open Files” for Apache and java/tomcat. How to set per-process limits?

This problem has now appeared twice on my production Ubuntu machine running both a node server (tiny) and a Spring Boot Java server (the workhorse). The first time it happened, grinding my server to a ...
2
votes
1answer
52 views

Is there a limit for the read command?

I'm trying to write a bash script that will let me save a backup code (lots of numbers) in a file. I've finished the script but it's only letting me to save 4096 digits of the code. I tried to do this:...
3
votes
1answer
98 views

How can I limit both pty and non-pty ssh sessions to 'maxlogins'?

I have a normal Linux user that is: only allowed to login via ssh to execute a single command and nothing else may never login more the once at a single time The first restriction is implemented ...
0
votes
0answers
40 views

How to automatically set quotas/limit for a new user home directory?

I'm using a perl cgi script to create new users in my Debian server through a web portal. Users sing up in my website and their server user is created, using pam_mkhomedir.so module to create their ...
1
vote
1answer
47 views

How can I limit the CPU usage (% of CPU)?

It happened to me multiple times now that a program which entered an infinite loop made the entire machine completely unresponsive, one time even foreign JavaScript, and I had to power off. This is ...
1
vote
0answers
51 views

AMDGPU driver vramlimit

I have a console installation of debian and i found that from the available 16GB of ram i can see only 14GB, this is because my APU (AMD) is reserving 2GB which is way too much for my needs. The bad ...
3
votes
1answer
49 views

Linux not enforcing limits correctly?

As an experiment on a test system, I tried to limit my own number of processes using /etc/security/limits.conf. When logged on the system I had 16 processes to my name running (all had ruid, euid and ...
1
vote
1answer
91 views

Limits of tmpfs filesystem

What are the limits of the tmpfs filesystem in terms of: Maximum file size Maximum file system size Maximum subdirectories Maximum symlink depth I'm using a centOS 8. The tmpfs is mounted via: [...
1
vote
1answer
65 views

Not able to increase ulimit -Hn, only shows up for a sudo su session

So I am trying to change my hard limit for file descriptors on Ubuntu18.04 laptop. I have tried everything but the changes have still not taken effect. I need to run a go program which keeps throwing ...
0
votes
1answer
17 views

Unable to login to a user(oracle) “error: resource temporary unavailable”

When I try to login to oracle via ssh or su - oracle it shows following error **error:resource temporary unavailable** CPU Memory & IOps utilization is normal
0
votes
0answers
32 views

How can df report different information depending in it's target path?

Example: root@myinstance:/my/instance/path# df -h Filesystem Size Used Avail Use% Mounted on ... /dev/mapper/hdd-place 13T 899G 12T 8% /run/iss ... root@myinstance:/my/instance/...
0
votes
0answers
58 views

Limit outgoing tcp syn packets

I want to rate limit outgoing TCP SYN packets to prevent syn floods from local virtual private server customers. Since the virtual private servers use the macvtap driver I cannot use iptables. I have ...
0
votes
2answers
137 views

“Xorg” process does not take limits from /etc/security/limits.conf

I have this in my /etc/security/limits.conf: #<domain> <type> <item> <value> root - memlock 65536 root - stack 524288 root ...
0
votes
0answers
44 views

limits.conf nproc not being applied

this is our limits.conf * soft nofile 999999 * hard nofile 999999 * soft noproc 256000 * hard noproc 256000 and then we check for the changes after a reboot, ...
3
votes
1answer
105 views

How to “soft-limit” CPU usage of a process

I have some processes running on Debian that I want to limit cpu of it usage in the "soft" manner. For example, if it eats more than 70% of a single core for more than 15 minutes, the CPU ...
0
votes
1answer
116 views

limits.conf is not working

I'm trying to set default niceness/priority for a user's processes on Ubuntu 18.04.3 LTS in limits.conf and everything I write in limits.conf is simply ignored. Hard nice, soft nice, hard priority, ...
4
votes
0answers
212 views

Processes started through SSH add up to limit of SSH Daemon (systemd)

on a productive server there are (background) processes started by users which connect through SSH and run some scripts. These processes are daemons and keep on running. Each started process is found ...
1
vote
1answer
166 views

apache2 limits prefork

mb someone could give me some recommendation what limits should i use? I have problem with webservice in centos7-cloudlinux Cpanel server, Apache2.4. When server have high traffic in apache2 error ...
3
votes
1answer
31 views

Is it possible to impose a minimum niceness on a specific user?

Is it possible to limit a specific user's processes to always run with a niceness of at least 15, say?
2
votes
1answer
2k views

Limit bandwidth on a specific port in CentOS 7?

I am running CentOS 7 on my VPS and I would like to limit bandwidth on a specific port. I have looked around extensively, and out of the solutions I can find, either it's a limit placed on an ...
0
votes
0answers
221 views

Restricted shell within docker container

Some context for my question: I am working on a pty NodeJS server running in docker where I want to provide users connecting to the shell an isolated environment where they can play around with ...
1
vote
0answers
253 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 ...
0
votes
1answer
29 views

Setting soft limit above hard does not fail in terms of exit code?

root@Andromeda:/# ulimit -n -S 2048 root@Andromeda:/# ulimit -n -H 2048 root@Andromeda:/# ulimit -n -S 4096 2048 root@Andromeda:/# echo $? 0 Failure to set soft limit above the hard one makes sense. ...
5
votes
1answer
178 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 ...
1
vote
1answer
96 views

Change max line length of GNU parallel

The following command: parallel --max-line-length-allowed returns 131049. Is this a constant, or can I somehow change this limit?
1
vote
1answer
277 views

Limit on continuously writing to a log file

I am using Debian running on a BeableBone Black with 4GB of internal flash storage. My program is continuously writing / appending to a log file that I created with >> every minute, all day ...
0
votes
1answer
873 views

Open file limits not increased for redis user despite change in /etc/security/limits.conf

I got ERR max number of clients reached from my redis server so I decidied to increase the allowed max client connections in its configuration. This also requires according to the documentation, ...
1
vote
1answer
1k 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 ...
8
votes
1answer
5k views

How to limit a systemd service to “play nice” with the CPU?

I have a systemd service (a CI runner) that tends to bog the system down with very CPU intensive jobs. I caught the load average flying over 100 just now and want to put a stop to that nonsense. ...
2
votes
0answers
283 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 ...
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
351 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 ...
9
votes
1answer
48k views

max no of tcp connections on a linux system

I know that /etc/security/limits.conf provides the persistent soft and hard limits for several values. However, in the relevant list there is no indication about imposed limits on: a) concurrent ...
0
votes
1answer
738 views

cgroups: Is it possible to limit cpu usage by process name instead of by pid

As we know, cgroups can limit cpu usage of processes. Here is an example: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 30142 root 20 0 104m 2520 1024 R 99.7 ...
1
vote
2answers
553 views

Preventing un tar from using too much CPU

I am running un tar i.e tar xzvf abc.tar.gz on Beaglebone green. This seems to be using too much CPU. When a untar operation is in progress, i see via top command the CPU usage.. not sure why it seems ...
0
votes
1answer
224 views

Is there a way to restrict the application access to the system time in linux?

Is there a way to restrict the application access to the system time in linux? I want to make the application launch as much as possible abstracted from the environment. If you can restrict access to ...
6
votes
1answer
6k views

ulimit vs file-max

Could someone explain limit on open files in linux? The problem is that one of my applications if reporting "Too many open files". I have ulimit -n 1024 but cat /proc/sys/fs/file-max 6578523 and ...
1
vote
0answers
257 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 ...
0
votes
1answer
576 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
0answers
419 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 ...
2
votes
0answers
720 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
108 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 ...
2
votes
2answers
4k views

How to limit the number of open files for nfsd with systemd

It's fairly straightforward to control open file limits for many services with systemd: You create a file at /etc/systemd/system/$service_name.service.d/limits.conf, add a [Service] section with ...
2
votes
0answers
316 views

How to check usage of mqueues reliably?

I run a testing server for 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 ...
1
vote
0answers
225 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 ...
2
votes
3answers
11k views

Increasing open files limit for all processes: Do I need to set Soft/Hard limits?

I'm trying to fix the following error that I get after a day or two of running my game server. 2017/12/13 12:08:35 http: Accept error: accept tcp [::]:8081: accept4: too many open files; retrying in ...

1
2 3 4 5