Questions tagged [resource-limiting]
For questions regarding limiting some resource of the computer, generally RAM, I/O or CPU usage.
54
questions
0
votes
1
answer
657
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?
0
votes
0
answers
95
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 ...
2
votes
1
answer
372
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 ...
1
vote
0
answers
127
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 ...
2
votes
0
answers
114
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 ...
0
votes
0
answers
162
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 ...
1
vote
0
answers
44
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 ...
0
votes
0
answers
89
views
Ubuntu 20.04 Limit Crash and Coredump?
This is strange.
5.9G ./var/crash
2.1G ./var/lib/apport/coredump
How to safely limit it? System has 128 GB of RAM. Maybe that's why dumps so large? Thanks!
0
votes
0
answers
139
views
ubuntu 20.04 freeze when compiling kernel modules
I'm using ubuntu20.04 in VMware workstation. I allocate 8 cpu cores, 6G RAM, 4G swap and enough free disk space(at least 25G) to ubuntu20.04. But after running make modules -j4 for about 30 minutes ...
0
votes
0
answers
121
views
Low CPU usage running multi threading software
I ran into a weird problem. While running some software (SPAdes, bwa-mem2; latest versions) with 16 threads I noticed that they slowed down, and CPU usage is around 0-2% during that. Since it would be ...
1
vote
0
answers
319
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.
...
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 ...
0
votes
1
answer
333
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 ...
1
vote
0
answers
675
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
...
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 ...
2
votes
1
answer
1k
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 ...
20
votes
3
answers
24k
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 ...
1
vote
1
answer
463
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 ...
1
vote
0
answers
170
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 ...
0
votes
0
answers
848
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 ...
1
vote
1
answer
756
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 ...
2
votes
0
answers
810
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 ...
0
votes
1
answer
455
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 (...
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 ...
3
votes
1
answer
2k
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 ...
3
votes
1
answer
1k
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
...
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 ...
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 ...
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?
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 ...
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 ...
32
votes
3
answers
73k
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
...
0
votes
1
answer
32
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?
1
vote
2
answers
6k
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 ...
1
vote
0
answers
626
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 ...
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 ...
0
votes
0
answers
331
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, ...
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 ...
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....
6
votes
2
answers
837
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. ...
4
votes
2
answers
2k
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 ...
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 - ...
3
votes
1
answer
1k
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 ...
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 ...
6
votes
5
answers
19k
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 ...
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'...
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 (...
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 /...
7
votes
2
answers
15k
views
Permanently set process limit
How do you permanently set process limit per user (ulimit -u) in Ubuntu?
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 ...