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
0 answers
16 views

Why my app cannot write to a file after a certain size?

Recently, I was running a spike risc-v simulation app on linux and noticed that log output stops after 513MBs, even though expected to have larger sizes. I checked ulimit with -f and other options, ...
0 votes
1 answer
121 views

How to limit the concurrent GUI login, but allow multiple SSH login?

On an Ubuntu desktop, contains several accounts, I want to limit the GUI login number. At anytime, there should be only one account can login by using local GUI. (The first account must logout before ...
  • 1
0 votes
0 answers
91 views

grep: What is the limit for a pattern file size

I am using grep with the -f option and I run into an issue when the pattern file given with -f is very long. The one that is failing for me has almost 300 thousand lines and 40 MBytes. grep does not ...
  • 222
2 votes
1 answer
108 views

How limit CPU/Ram on a system service on nixos?

My metabase service is eating all the resources on my machine, and while found a solution I need a way to limit the usage the resources. How can I configure it on nixos? ❯ nixos-version 22.05.2123....
  • 121
0 votes
1 answer
508 views

How to determine "number of concurrent sessions" for all users on a server

I am trying to determine the total number of concurrent sessions on a server to determine a good number for the maxlogins option in /etc/security/limits.conf. How is the number of sessions calculated ...
  • 1,057
1 vote
0 answers
203 views

systemd/cgroup resource limits -- different behaviour between hosts

I'm heavily confused. I have a physical server running Ubuntu 20.04 and a vagrant (VirtualBox) virtual machine also running Ubuntu 20.04. Both are running with hwe 5.13 kernel and systemd 245 (245.4-...
  • 1,261
0 votes
0 answers
29 views

Transparently Rate Limiting ANY Connection that is Already In-Progress

Let's say I begin a large download, and (about an hour into it) I find that it is consuming too much of my overall bandwidth. Is there any way to rate limit that particular connection "after the ...
  • 4,693
1 vote
0 answers
236 views

systemd resource control -- all users/root

I'm using Debian Bullseye with systemd 247. I have more than a hundred of users and I would like to enforce some limits using cgroups. I use set-property, which works as expected, for example for the ...
  • 1,261
3 votes
0 answers
214 views

Linux: Is there a limit for the number of fork() calls one process goup can issue? (Not per user!)

We have a strange problem on a SuSE Linux Enterprise Server 12.5 system (kernel 4.12.14-122.60), which is the only KVM guest in a simliar KVM host: One service started by systemd starts one program -&...
2 votes
0 answers
704 views

How can I limit bandwidth per connection using tc?

I am pretty new to Linux and tc command and lately I have been looking for a solution to limit bandwidth per connection using the tc command. I have a server application that handles requests from ...
  • 21
0 votes
2 answers
966 views

Values from sysctl -A don't match /etc/sysctl.conf even after restart

I'm on Mac Monterey 12.1 and increased my shared memory limits in /etc/sysctl.conf file: kern.sysv.shmmax: 16777216 kern.sysv.shmmin: 1 kern.sysv.shmmni: 128 kern.sysv.shmseg: 512 kern.sysv.shmall: ...
0 votes
0 answers
440 views

Can't set fs.nr_open limit via sysctl

I'm trying to set fs.nr_open via sysctl (for learning purpose) to different value, other than default 1048576 These are sysctl settings after system was booted: vud@ubuntu:~$ sudo sysctl -a | grep -E '...
  • 1
0 votes
1 answer
350 views

Create limitations systemd service file

I wanted to set some limits for my systemd service, such as: Network bandwidth Cpu quote If the limit is over, then systemd service should stop. Thank you in advance
  • 1
1 vote
0 answers
81 views

How do I make a Linux process believe it is using 100% of CPU while limiting it with a cgroup?

Cgroups allow artificially limiting CPU time available to a process using cpu.cfs_quota_us and cpu.cfs_period_us parameters. This however results in a discrepancy when the program monitors its CPU ...
  • 5,378
0 votes
0 answers
54 views

OpenBSD 6.9 - ENOMEM error on execve (execvp)

I've compiled a program on OpenBSD 6.9 and when I execute the program, I get an enomem error related specifically to execvp which the man pages say is a font-end for execve. The execve man page ...
0 votes
1 answer
281 views

How to get the correct device to limit block IO for docker container?

(I posted this question at stackoverflow, but maybe here is the more appropriate place, if necessary - I'll delete the other question.) I need to put a limit on block IO operations speed for a number ...
  • 125
1 vote
0 answers
329 views

How to best hard-limit my Firefox' memory hogging?

I use Firefox 83 on my Devuan GNU/Linux Beowulf desktop. Unfortunately, for reasons which are not clear to me, FF has memory issues which cause it to gradually take up more and more of my system's ...
  • 8,143
0 votes
2 answers
284 views

LVM 4,55 TiB Volume Group. I only can create a 2.70TiB logical volume

I create a Volume Group with 3 disks, 2 of 931g, and 1 of 2.73t. It seems like works propertly. sudo pvs PV VG Fmt Attr PSize PFree /dev/sdb nxt lvm2 a-- 931.51g 931.51g /dev/...
0 votes
1 answer
193 views

Is there a file system out there that supports custom file size limit?

I'm aware that EXT4 has a max_dir_size_kb mount option to set up the max size of each directory. It doesn't have a similar option to specify the max size of individual files, though. Is somebody aware ...
  • 1,279
2 votes
2 answers
1k views

Where does the systemctl Tasks (limit=) come from and can I temporarily change it?

I am having trouble with Tomcat 9, openjdk 11.0.9.1 on ubuntu 18.04. I installed it using these instructions: https://linuxize.com/post/how-to-install-tomcat-9-on-ubuntu-18-04/ It worked fine for a ...
  • 41
1 vote
1 answer
653 views

limits.conf not working for SSH connections on Fedora 33

I am trying to set a limit on a group called rlimited. I have the following in my /etc/security/limits.conf @rlimited hard cpu 5 The same file exists in the /etc/security/limits.d/ folder. I've also ...
  • 19
0 votes
1 answer
5k views

rhel 7 setting stack size to unlimited

I have some old code that needs the stack to not be limited to 8192kb in order for it to run. I am used to doing this in /etc/security/limits.conf * stack hard unlimited * stack soft ...
  • 5,195
0 votes
1 answer
955 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
0 answers
192 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/ ...
  • 31
3 votes
2 answers
156 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 ...
  • 3,588
1 vote
1 answer
4k 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 ...
4 votes
1 answer
921 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:...
  • 611
4 votes
1 answer
948 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 ...
1 vote
1 answer
1k 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 ...
user avatar
2 votes
1 answer
1k 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
1 answer
81 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
1 answer
2k 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
1 answer
1k 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 ...
  • 125
0 votes
1 answer
82 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
  • 99
0 votes
0 answers
43 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/...
  • 2,877
0 votes
2 answers
413 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
0 answers
256 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
1 answer
661 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 ...
2 votes
1 answer
745 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
0 answers
769 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 ...
  • 281
3 votes
1 answer
83 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?
  • 14.2k
2 votes
1 answer
7k 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 ...
  • 575
0 votes
0 answers
675 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
0 answers
335 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 ...
  • 21
0 votes
1 answer
52 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. ...
  • 2,433
5 votes
1 answer
453 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 ...
  • 418
1 vote
1 answer
295 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
1 answer
994 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 ...
  • 1,071
0 votes
1 answer
2k 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, ...
  • 2,433
1 vote
1 answer
3k 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 ...

1
2 3 4 5