Questions tagged [resource-limiting]

For questions regarding limiting some resource of the computer, generally RAM, I/O or CPU usage.

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

Set core file size limit permanently

I am trying to allow all core dump files to take up to 10 GB on 22.04.2. Permanently. For all users. I believe the unit is 1KB-blocks. I know I can do ulimit -c 10000 to set the limit for at least ...
nabelekt's user avatar
1 vote
1 answer
1k views

On Ubuntu 22.04, editing limits.conf to increase number of file descriptors doesn't work

I followed this answer: https://askubuntu.com/a/162230 I edit limits.conf, now it is * soft nofile 65536 * hard nofile 65536 * soft nproc 65536 * hard nproc Unlimited root soft nofile 65536 root ...
Ryan's user avatar
  • 13
0 votes
1 answer
3k views

How can I turn on cgroup v2 CPU controller on modern Ubuntu?

On Ubuntu 22.04, I get: # cat /sys/fs/cgroup/cgroup.controllers cpuset memory hugetlb pids rdma misc I really need cpu contoller. Could you, please, help on how to enable it?
JenyaKh's user avatar
  • 113
0 votes
0 answers
111 views

Ulimit settings doesn't applied (when I log off/after a while)

I have a bash script that creates IPv6 proxies using 3proxy. It works just fine. I wanted to add a new function called rotating. Basically, this rotating mode adds IPv6 addresses to the network ...
Erikli's user avatar
  • 419
2 votes
1 answer
622 views

I cannot set ulimit on subshell

I have a bash script. This bash script needs to be ran every 5 minutes so I created this code block: #!/bin/bash ulimit -n 600000 ulimit -u 600000 echo -e "This is another bash script to run ...
Erikli's user avatar
  • 419
1 vote
0 answers
353 views

How to move already running processes to different `cgroup` with systemd?

I'm using Ubuntu 20.04 LTS with MATE desktop which doesn't natively support launching desktop UI and window manager in a separate cgroup from the other applications. Is it possible to run some systemd ...
Mikko Rantalainen's user avatar
2 votes
0 answers
401 views

How to configure cgroup resource limits for desktop applications using official systemd features?

I've previously used cgmanager to group processes in separate cgroups and adjust memory and CPU limits as needed for each group. However, modern systemd doesn't want that other processes mess with ...
Mikko Rantalainen's user avatar
0 votes
0 answers
314 views

Ubuntu 22.04 resource (cpu, ram, swap) issues

I am on a fresh Ubuntu 22.04 installation on a ThinkPad E15 (16gb ram, 512gb ssd, [email protected] x8, Radeon 550x). The system is used to run 7 docker containers and multiple node processes (in ...
J. Samak's user avatar
1 vote
0 answers
119 views

How to configure systemd to put all my browsers in a single cgroup

Long time ago I used cgmanager to put all my browsers (Opera, Firefox, Chrome) in a single cgroup and set max RAM usage limit for that group. However, modern systemd really doesn't want other programs ...
Mikko Rantalainen's user avatar
1 vote
0 answers
508 views

How can I enable resource limit delegation for my not-root user using cgroups?

I am trying to set up resource limit delegation for a specific user myuser on Ubuntu 20.04.5. The point is that I need to be able to control resource limits when running my rootless Podman container. ...
87dsf897w6543d54fsdf's user avatar
8 votes
3 answers
2k views

Is the kilobyte used by time and ulimit commands either 1000 (SI) or 1024 (old school) bytes?

From man time: M Maximum resident set size of the process during its lifetime, in Kilobytes. From ulimit -a: max memory size (kbytes, -m) unlimited But a "kilobyte" may mean ...
abukaj's user avatar
  • 465
0 votes
1 answer
499 views

cmake consumes 100% of CPU

I noticed a very high CPU usage on Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-125-generic x86_64). Using htop I can see 3 processes with the command: /usr/share/[cmake] --config=/usr/share/[cmake].pid which ...
scott_m's user avatar
  • 133
2 votes
0 answers
1k views

Understanding too many open files and current limits

A Java application will sometimes have issues after the logs point to too many open files. Okay, let's look at some limits... cat /proc/sys/fs/file-max -> 200000 ulimit -n -> 1024 ...
Bart Silverstrim's user avatar
3 votes
1 answer
1k views

Limiting RAM usage with prlimit

I need to run a program not written by me (i.e. BLAST) on linux (Ubuntu 20.04.3 LTS), and I need to set the limit for RAM usage for this specific case, since I am working on a shared cpu. Also, I ...
ashenflower's user avatar
2 votes
1 answer
3k views

Limit CPU and Memory using cgroup in Ubuntu 20.04 LTS server edition

I have 3 groups in Ubuntu 20.04 LTS server which is group1, group2, group3. I would like to limit CPU and memory for each groups. Group1 only allowed to use 20% CPU and 10GB RAM Group2 only allowed ...
Arvin's user avatar
  • 21
22 votes
3 answers
33k views

How can I limit the CPU and RAM usage for a process?

I'm on a Ubuntu VPS with SFTP and a console. I need a specific process to only use 60% of my CPU and 2048 MB of RAM. I also need that another process only uses 30% of CPU and 1024MB of RAM. How can I ...
newalvaro9's user avatar
1 vote
1 answer
559 views

How do I stop Pulseaudio using huge amounts of VIRTUAL memory?

How do I stop Pulseaudio using huge amounts VIRTUAL of memory? USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND jabowery 2421222 0.6 0.0 62272820 61344 ? Sl 17:08 ...
James Bowery's user avatar
1 vote
0 answers
208 views

How to play a podcast from the console with the "gpo" interface to Gpodder?

Using the gpo text interface: nicholas@gondor:~$ nicholas@gondor:~$ gpo gPodder 3.10.17 (2020-11-23) - http://gpodder.org/ (c) 2005-2020 The gPodder Team License: GNU General Public License, version ...
Nicholas Saunders's user avatar
0 votes
0 answers
1k views

Stops downloading large file after 2GB

I've had an issue downloading large files where the download halts after each 2GB chunk of data for a while now (possibly from the very start of using Kubuntu). For example, I am downloading a >8GB ...
Anton Blomström's user avatar
1 vote
1 answer
954 views

kernel does not support Block I/O weight error, Docker

I need to set block IO limit to a docker container. I decided to try out this docker feature, but I am getting the following: (base) me@ubuntu:~/dev/ws3$ docker run -it --name cont_B --blkio-weight ...
gai-jin's user avatar
  • 111
2 votes
0 answers
921 views

How To Limit User RAM and CPU

So this is my first time posting on Ubuntu forums, so please excuse me if this question is repetitive, or just plain stupid. A bit of background: I am a 14yr old developer, who has an ubuntu 20.04 ...
Mihir Garg's user avatar
0 votes
1 answer
548 views

Applications are ignoring/exceeding user-set CPU frequencies limitations (20.04)

I've been trying to limit the maximum allowed CPU frequency on a 2nd gen Intel i7 CPU. To do that, I tried: sudo cpupower -c all frequency-set --max; TLP, setting both the percentage and frequency (...
Frozenpick's user avatar
0 votes
1 answer
3k views

How can I limit GPU usage for every process?

I'm trying to switch over back to Linux (as my primary OS at least) and one thing that's annoying now is mining etherium. On Windows even with 99% GPU usage everything runs perfectly fine and I can ...
luna0's user avatar
  • 1
3 votes
1 answer
3k views

Ubuntu 18.04: Maximum number of clients reached - related to dbus-daemon

From time to time I get this message, I cant start application when this happens. I've tried those links: Can't start applications due to “Maximum number of clients reached” error and How can I ...
yossico's user avatar
  • 131
3 votes
1 answer
2k views

fork: retry: Resource temporarily unavailable in spite of highly tuned server settings

# cat /etc/sysctl.conf fs.aio-max-nr=99999999 fs.file-max=99999999 kernel.pid_max=4194304 kernel.threads-max=99999999 kernel.sem=32768 1073741824 2000 32768 kernel.shmmni=32768 kernel.msgmni=32768 ...
Roel Van de Paar's user avatar
0 votes
1 answer
2k views

Limiting ram usage of a program

Is there an easy way to limit the ram consumption of a specific program? I have a program that generates a really big file, up to 1 gb and it causes my whole laptop to freeze up. I want to limit the ...
InxaneNinja's user avatar
1 vote
1 answer
4k views

When I modify /etc/security/limits.conf I get "E45: 'readonly' option is set (add ! to override)" [duplicate]

I'm trying to increase the open files limit for Ubuntu 16.04 version by using vi /etc/security/limits.conf Then I add two lines like: #* soft nofile 4096 #* hard nofile 4096 But when I use :x to ...
nebras junaid's user avatar
1 vote
0 answers
75 views

18.04 LTS install - Allocating resources problem message

I installed 18.04 LTS on my laptop and I get an 'Allocating resources problem' error message. Do I wait this out or is there something I must do?
12344wqeasd's user avatar
2 votes
1 answer
1k views

What is the best cgmanager alternative for Ubuntu 18.04 LTS?

I was using package cgmanager to automatically manage processes into memory cgroups in Ubuntu 16.04 LTS environment. However, I did a fresh install of Ubuntu 18.04 and package cgmanager is no longer ...
Mikko Rantalainen's user avatar
1 vote
0 answers
1k views

Ubuntu desktop, wildcard nofile not working

I've tried setting the file limit to 32000 on ubuntu desktop for normal users by adding the following lines: * soft nofile 32000 * hard nofile 32000 To: /etc/security/limits.conf But, even after ...
George's user avatar
  • 55
33 votes
3 answers
79k views

How to increase max open files limit on Ubuntu 18.04?

I've run ulimit -n 65536, added the following lines to /etc/security/limits.conf: * soft nofile 65536 * hard nofile 65536 alix soft nofile 65536 alix hard nofile 65536 root soft nofile 65536 ...
Alix Axel's user avatar
  • 1,033
0 votes
1 answer
33 views

How resource management work in snappy?

If I deploy a software with snappy how does the resource management occurs for that particular software? Is the resources elastic in terms of the system? Or is it defined?
Farukh's user avatar
  • 1,063
1 vote
2 answers
7k views

Cannot increase open file limit beyond 999999 on 14.04+

I'm trying to increase open file limit for root user as well as non-root user via /etc/security/limits.conf. But, cannot get past 999999, anything above this value reverts to default 1024 nor I can ...
Shan's user avatar
  • 1,963
1 vote
0 answers
646 views

How can I give resource to Ubuntu for Windows 10?

I installed Ubuntu from Microsoft Windows 10 store. It's good for my task and run well. Thanks you for your job. But it has just one problem, too slow at all. How can I give more resource to Ubuntu ...
HansolLim's user avatar
1 vote
1 answer
2k views

limit internet bandwidth (17.04) [duplicate]

I want to limit the internet bandwidth to avoid causing a bad ping for other users in the same network. I used to use wondershaper but it doesn't seem work on Ubuntu 17.04 (kernel 4.10, 64bit): sudo ...
jl005's user avatar
  • 173
0 votes
0 answers
362 views

Error: You must specify exactly one target process

what is the syntax to use cpulimit to throttle Web Content? Note the space between Web and Content. top - 09:16:00 up 1:09, 2 users, load average: 1.80, 1.70, 1.77 Tasks: 215 total, 2 running, ...
Thufir's user avatar
  • 4,551
5 votes
0 answers
2k views

Using multiple GPU's in Ubuntu 16?

I have a question I have been researching for days on. I have a MSI z97 gaming 5 board with 7 PCI slots. All the slots work fine for GPU's as I have an identical board with 7 AMD GPU's running. The ...
bughatti's user avatar
1 vote
1 answer
1k views

Running an executable with fixed execution-time and memory limit and getting exit-code

What is the best way to run an executable with execution-time and memory(RAM) limit (e.g. 2.5 seconds and 32768 kB)? I need to get the exit-code if it exits without violating time and memory limits....
user1857492's user avatar
6 votes
2 answers
867 views

How to enable cpuset on Ubuntu 12.04?

I have set up CPU sets with cset in Ubuntu 12.04, but they are not respected. Processes just use all the CPU they can, no matter what set they are assigned to. It seems that cpuset is not enabled. ...
Ruben Verborgh's user avatar
4 votes
2 answers
3k views

Is it possible to reserve/limit the network usage for certain processes (applications)?

Is it possible to reserve (at least so much bandwidth) or limit (no more than so much bandwidth) the network usage of certain processes or applications. Alternatively, reserve/limit the network usage ...
Baard Kopperud's user avatar
3 votes
0 answers
29 views

Limiting physical memory of specifc process [duplicate]

Performing research, I am interested in limiting the Physical Memory per specific process. My requirements: Limit physical memory consumption for specific program In case of crossing limitation - ...
Yonatan G's user avatar
3 votes
1 answer
2k views

Limits are restored to the defaults after I reboot

I want to remove "memorylocked" and "maxproc" limits. I am using tcsh shell. I read that if I use #limit memorylocked unlimited and #limit maxproc unlimited then they will be set to unlimited. I did ...
Babak H's user avatar
  • 31
12 votes
1 answer
19k views

How to impose memory limits on a shell script?

I have a PHP script that, while a folder contains XML files, will process them onto the database. Currently, the server is running PHP version 5.3.10 and there's a bug report about memory issues ...
Zuul's user avatar
  • 1,974
6 votes
5 answers
20k views

Limit the size of a directory by deleting old files

I have a IP cam which save its recordings in a specific directory named Camera1 in my Ubuntu Server 12.04. I would like to limit the size of this folder to 5 gigs, by deleting -say once a day- the ...
Sulliwane's user avatar
  • 2,085
0 votes
0 answers
175 views

Limit overall cpu usage Ubuntu 12.04 [duplicate]

Possible Duplicate: CPU frequency scaling for 12.04? I was wondering if there is a way to limit the total cpu usage percentage? I know that you can limit the usage per process with cpulimit but I'...
GothFraex's user avatar
36 votes
2 answers
30k views

Memory limiting solutions for greedy applications that can crash OS?

I use my computer for scientific programming. It has a healthy 8GB of RAM and 12GB of swap space. Often, as my problems have gotten larger, I exceed all of the available RAM. Rather than crashing (...
Hooked's user avatar
  • 2,363
8 votes
1 answer
2k views

Fork bomb protection not working : Amount of processes not limited

I just came to realize that my system is not limiting the amount of processes per user properly thus not preventing a user from doing a fork-bomb and crashing the entire system: user@thebe:~$ cat /...
d_inevitable's user avatar
  • 1,902
7 votes
2 answers
15k views

Permanently set process limit

How do you permanently set process limit per user (ulimit -u) in Ubuntu?
redman's user avatar
  • 223
2 votes
1 answer
3k views

How to limit download/upload speed for specific users? [duplicate]

I want to setup an ubuntu server in which some users are limited to a specific download/upload speed.Is it possible? I know about Wondershaper, Trickle or similar tools but I don't want to limit ...
Pedram's user avatar
  • 5,691
21 votes
5 answers
16k views

Can I limit the CPU usage of a single application?

Is there a way to stop ClamScan eating my server CPU?
Pitto's user avatar
  • 1,938