Applicable to:
- Plesk for Linux
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:
CONFIG_TEXT: #!/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
Comments
5 comments
This measure causes this error in WP Toolkit when clicking the search button.
Please update.
Error:
vhostmng-find failed: sh: 1: /opt/psa/admin/bin/vhostmng-find: Permission denied
The article has now been updated to prevent the appearance of the
Error:
vhostmng-find failed: sh: 1: /opt/psa/admin/bin/vhostmng-find: Permission denied
error in WP Toolkit whenever the search button is pressed.Daniel Yordanov: Please fix the paths in question: Is there a way to use the ionice command to start the
/var/loca/psa/admin/bin/vhostmng-find
tool with a lower IO priority?Daniel Yordanov Apart from the typo earlier reported in my previous comment, I think the article is still wrong. I don't want to mislead anyone, so please check your instructions carefully.
Thank you for the feedback. The typo in the Question section of the article has been corrected now.
Please sign in to leave a comment.