Skip to main content

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
22 views

EINTR implementation in the kernel sources - statfs & newfstatat

I'm trying to locate where in the kernel source files does statfs and newfstatat syscalls might fail with EINTR (due to a pending signal). The man pages list EINTR as one of the possible errors these ...
Dan Barzilay's user avatar
3 votes
2 answers
525 views

How to limit the number of files printed by ls and print them in columns like ls prints normally?

Here is extension of the question: How do I limit the number of files printed by ls? with additional condition: how to print results in as many columns as fit to the current terminal width — as ls ...
Anton Samokat's user avatar
0 votes
1 answer
63 views

Piped dd command limits its output to 65536 bytes, why?

My colleague and I are both using a Docker container running Ubuntu 22.04.4 LTS (Jammy Jellyfish): root@c2155d7af4a4:/# grep VERSION= /etc/os-release VERSION="22.04.4 LTS (Jammy Jellyfish)" ...
Bart Vandewoestyne's user avatar
0 votes
1 answer
327 views

How to get rid of ssh bandwidth limit?

I was playing around with a server I set up myself, running archlinux, and when I tried to retrieve files from it, using scp or rsync, I noticed the download speed was abnormally low, being capped at ...
Mayeul Lnr's user avatar
2 votes
1 answer
130 views

How to prevent relayd on OpenBSD from using all memory

I have an OpenBSD "firewall" with relayd, where relayd starts to consume all available memory to the point that the system becomes completely non responsive. This happens when a user starts ...
VagrantPaladin's user avatar
1 vote
0 answers
153 views

How to limit the memory used for each process of a certain binary?

I have a process which is part of standalone, non-service executable. The process in question spawns thousands of co-processes under a single binary. I'd like to limit the memory usage of processes ...
tuskiomi's user avatar
  • 127
0 votes
1 answer
192 views

Limit CPU usage of background process if system is busy

At the moment I do the following: When I see that the system load of my Ubuntu server is high, I get the PIDs of specific currently running background processes and start cpulimit with the PID. When ...
Jomo's user avatar
  • 1
2 votes
1 answer
295 views

What is the way to enforce daily write limits on a disk partition in linux?

I would like to enforce certain write limits on my disk partitions. I would like to limit the amount of data application can write on a given disk partition on hourly, daily or weekly basis. Is there ...
Virat Manvar's user avatar
0 votes
0 answers
219 views

Performance limits of file I/O vs Unix pipes on multicore systems

I am running some benchmarks where I have a program that performs some file IO. It creates a fresh directory, writes and reads some files to that directory, and then deletes it. When I run this ...
Rewbert's user avatar
  • 131
1 vote
0 answers
88 views

Resource limits getting enforced only for processes in user's terminal not for su [user] from root's terminal

Cgroups v2 is enabled in almalinux 9.1 with kernel 5.14.0-70.22.1.el9_0.x86_64 and systemd 250 (250-12.el9_1.3). Content of /etc/systemd/system/user-1002.slice.d/override.conf: [Unit] Description=User ...
jay's user avatar
  • 31
1 vote
1 answer
481 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 ...
Eli's user avatar
  • 11
0 votes
0 answers
424 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 ...
Frigo's user avatar
  • 232
4 votes
1 answer
480 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....
mamcx's user avatar
  • 141
0 votes
1 answer
2k 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 ...
Natolio's user avatar
  • 1,272
1 vote
0 answers
528 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-...
Kamil's user avatar
  • 1,491
0 votes
0 answers
63 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 ...
Lonnie Best's user avatar
  • 5,215
2 votes
0 answers
2k 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 ...
Kamil's user avatar
  • 1,491
3 votes
0 answers
449 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 -&...
Stefan Brunthaler's user avatar
4 votes
0 answers
2k 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 ...
Ben's user avatar
  • 41
1 vote
2 answers
2k 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: ...
user997112's user avatar
  • 1,035
0 votes
0 answers
1k 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 '...
vudex's user avatar
  • 1
0 votes
1 answer
623 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
Daily's user avatar
  • 1
1 vote
0 answers
163 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 ...
Vi.'s user avatar
  • 5,853
0 votes
0 answers
89 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 ...
user avatar
0 votes
1 answer
432 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 ...
gai-jin's user avatar
  • 135
1 vote
0 answers
519 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 ...
einpoklum's user avatar
  • 9,808
0 votes
2 answers
655 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/...
EraSurfer's user avatar
0 votes
1 answer
356 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 ...
ChennyStar's user avatar
  • 1,805
2 votes
2 answers
2k 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 ...
Jeff's user avatar
  • 41
1 vote
1 answer
1k 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 ...
jr137's user avatar
  • 19
1 vote
1 answer
8k 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 ...
ron's user avatar
  • 7,423
1 vote
1 answer
2k 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 ...
user438686's user avatar
0 votes
0 answers
297 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/ ...
Tasbir's user avatar
  • 31
3 votes
2 answers
327 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 ...
peoro's user avatar
  • 3,868
1 vote
1 answer
6k 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 ...
crowmagnumb's user avatar
5 votes
1 answer
2k 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:...
adazem009's user avatar
  • 641
4 votes
1 answer
1k 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 ...
Tenders McChiken's user avatar
1 vote
1 answer
3k 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
3 votes
1 answer
2k 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 ...
VladimirXRO's user avatar
3 votes
1 answer
95 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 ...
Imanol Barba Sabariego's user avatar
1 vote
1 answer
3k 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: [...
onsmoosh's user avatar
1 vote
1 answer
2k 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 ...
sumopal's user avatar
  • 125
0 votes
1 answer
190 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
Dexpras's user avatar
  • 99
0 votes
0 answers
61 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/...
Dims's user avatar
  • 3,305
0 votes
2 answers
561 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 ...
Martin Vegter's user avatar
0 votes
0 answers
390 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, ...
Mario Bernheim's user avatar
3 votes
1 answer
1k 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 ...
Chieu Nhat Nang's user avatar
2 votes
1 answer
1k 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, ...
user619271's user avatar
4 votes
0 answers
950 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 ...
ap0's user avatar
  • 291
3 votes
1 answer
157 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?
kjo's user avatar
  • 15.8k

1
2 3 4 5 6