Applicable to:
- Plesk for Linux
Question
What is /pleskswap
file for?
Answer
The file /pleskswap
is created during the installation process in case the server has less than 1Gb of RAM. It is used as swap for the server.
Note: the following instructions apply only during the initial server deployment.
It can be managed in the /etc/pleskswaprc
file which overrides default swap settings:
-
Connect to the server via SSH.
-
Create
/etc/pleskswaprc
if it does not exist:# touch /etc/pleskswaprc
-
Edit file
/etc/pleskswaprc
with the possible options below:CONFIG_TEXT: # disable plesk swap. the same as creating /etc/pleskswapdisable
#PLESK_SWAP=disable
#path to swapfile (e.g. if needed to place swap to another partition)
PLESK_SWAP_PATH=/pleskswap
#change default swap size
PLESK_SWAP_SIZE=1GB
#required amount of memory. If actual memory+swap size if less than this value then plesk swap will be enabled before installation.
PLESK_REQUIRED_MEMORY=1GB
Note: after Plesk installation /pleskswap
can be removed manually.
Comments
2 comments
As you have mentioned pleskswap can be removed after installation. I just want to ask is it safe to delete the PleskSwap file in root directory of the server. will it have any negative affect on my server? Please also guide about how to delete it?
Hi Nelson Leiva,
I had a Plesk server with 4GB RAM and got the 1GM Plesk configuration. This could go even from the past.
Now I have a server of 8GB RAM, and as I have used restore to create it, I got the small SWAP file set to be 1GB again.
IMHO, Plesk should change its code, not to check only once for RAM size forcing the 1GB RAM, which will go with you even if server is switched to a one with more RAM, and also publish a clear gide, of how to change this Plesk set configuration if moving to a bigger RAM server, and not changing the above conf file before restore is done...
Please sign in to leave a comment.