Very useful Linux may often find that somehow it becomes very slow, this time most of the background process used cpu and memory too much. How to limit the CPU usage resources of each process?
You can use cpulimit to limit the CPU usage of each process. The usage rate is expressed in hundred percent.
Installing cpulimit
Installing with source code
# cd /tmp# wget 'http://downloads.sourceforge.net/cpulimit/cpulimit-1.1.tar.gz'# tar cpulimit -1.1.tar.gz# cd cpulimit-1.1# make# cp cpulimit /usr/local/sbin/# rm -rf cpulimit*Debian /Ubuntu users
More convenient installation with apt-get
$ sudo apt-get update$ sudo apt-get install cpulimit
How to use cpulimit?
Limit firefox to 30% cpu utilization
# cpulimit -e firefox -l 30
Programs that limit process number 1313 use 30% cpu utilization
# cpulimit -p 1313 -l 30
Find pid based on process name
# ps aux |
Less# ps aux |
Grep firefox# pgrep -u vivek php-cgi# pgrep lighttpd
You can use absolute path to limit cpu utilization of processes
# cpulimit -P /opt/firefox/firebox -l 30
Single core cpu and multicore Cpu
The usage rate of single-core cpu ranges from 0% to 100%, and the usage rate of quad-core cpu ranges from 0% to 400%.
Related Tools
nice : Run the program with the specified priority
renice: Adjust the priority of the running process
I. Overview: Adding a program to the Linux kernel requires the following three tasks: 1. Copy the s
Because of work and study, you need to use Securecurt to operate Linux (Red Hat Enterprise Linux 5)
In the various Linux distributions now, the enterprise version of red hat is relatively safe. For t
Use httpry to sniff HTTP traffic under Linux Tutorial Sometimes you want to sniff HTTP traffic for
Website Management SSH Common Commands
The method of making rpm packages under linux
LINUX vim replaces string instructions
PHP shared memory implementation of php memory queue
Squid, nginx, lighttpd reverse proxy difference
Linux SSH jump server reported Host key verification failed problem solved
Disk partitioning under Linux, file system formatting and raid device
Centos crack password and run level
How to use BitTorrent to download in the Linux command line
IOCP, kqueue, epoll ... How important is it?
Ecmal batch add stores (including partitions and permissions)
NSIS ERROR error resolution when XP system opens software
How to scan QR code WeChat scan QR code tutorial
How to enable or disable the system auto play
Win8 Encyclopedia 62: Configure the power supply to make standby more durable
How does Beyond Compare clear log messages?
Win7 system Forgot password (solution 3)
How to set up your own computer disk without being accessed by others
Win7 system boot pop-up "Windwos drive is not ready" How to solve
How to display hidden folders in WIN7 system
Win8 sleep file (HIBERFIL.SYS) is too large to account for how to delete memory?