Menu Close

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

For the last 3 or 4 years i also maintain the server my blog is hosted on. I share the server with a VBulletin 4 forum, this forum is a well visited forum with thousands of vistiors a day. VBulletin itself is a pretty heavy software to run and in combination with all those visitors it caused a high server load and to lower that load one of my “tweaks” was installing 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/

0 0 votes
Article Rating
Subscribe
Notify of
guest

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

0 Comments
Inline Feedbacks
View all comments