Question
- Is there a way to use the ionice command to start the
/var/local/psa/admin/bin/vhostmng-find
tool with a lower IO priority?
Answer
Warning: Be advised that the bash script part will be removed automatically during the next Plesk update and will have to be applied again. Also, bear in mind that this solution does reduce the disk I/O load, but it also increases the execution time.
You may use a bash script in combination with ionice
in order to lower the I/O that vhostmng-find is using by following these steps:
Note: The purpose of the bash script in the steps below is to run the original vhostmng-find
file that has been renamed to /usr/local/psa/admin/sbin/real-vhostmng-find
with a lower priority via the ionice
command
1. Log into your server via SSH
2. Move /usr/local/psa/admin/bin/vhostmng-find
to /usr/local/psa/admin/sbin/
and rename it by running this command:
# mv /usr/local/psa/admin/bin/vhostmng-find /usr/local/psa/admin/sbin/real-vhostmng-find
3. Create a new bash script file named /usr/local/psa/admin/bin/vhostmng-find
(this one will replace the one that was just moved) by using your favorite command-line text editor.
4. Input the following lines within the newly created file:
Note: You can replace 2
and 6
with the scheduling class and priority level that you find suitable for your specific situation while referring to the information on this link:
#!/bin/sh
ionice -c 2 -n 6 /usr/local/psa/admin/sbin/real-vhostmng-find $@
5. Apply the necessary permissions to the newly created file:
# chmod 755 /usr/local/psa/admin/bin/vhostmng-find