Menu Close

Install SPRI (System Priority) on CentOS 7 or CPanel server

When experiencing a high server load one of my “tips” is to install SPRI.


Description:
The problem? Linux has priority levels to thread all tasks at, these prio’s are ranged from -20 to +19 (negative = high prio, positive = low prio) with 0 as the default for all processes. So, this being the fact, with everything operating at prio 0, you get fights between services as to who gets what resources first.

Solution? Very simply, queue different processes at different priority levels to effectively discipline the system on who gets what resource access first. SPRI (System Priority) is a utility designed to que different processes with different priority levels based on 3 class levels of importance (high,med,low). The average load level of a server can be substantially decreased by using spri, of course results may vary.

Installation:
Logon to your CentOS server using ssh and to install SPRI, execute the following commands (as root):

wget http://www.rfxn.com/downloads/spri-current.tar.gz
tar xvfz spri-current.tar.gz
cd spri-0.5
./install.sh

To check it, Please run the following command:

spri -v

SPRI has very straight forward usage and configuration. First, you should edit the preset of class rules provided with SPRI. The files are located at:

/usr/local/spri/high
/usr/local/spri/med
/usr/local/spri/low

The priority associated with each level is defined in the conf.spri file. Once all options are to your satisfaction you should run spri to test it. You can run spri using two different commands:

spri -q
spri -v

Using -q will hide the output and -v will show you the output after running the spri command. The average load level of a server can be substantially decreased by using spri, by as much as 5-20%, of course, results may vary.

Sources:
Description source: https://www.rfxn.com/projects/system-priority/
Installation source: https://grepitout.com/install-spri-on-centos-or-cpanel-server/

2,290 total views, 2 views today

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of