• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Debian - Custom - swap memory

Teal_cfr

Basic Pleskian
Server operating system version
Debian 10.13
Plesk version and microupdate number
Plesk Obsidian 18.0.49 Update #2
Hi,

I have 2 server :

One dedicated running on Ubuntu 20.04.5 LTS with 125.71 GB of memory and 512.00 MB of swap memory (used at 20%) : this one hosting 6 websites

One is a VPS on cloud services on Debian 10.13 with 30 GB of memory and 1GB of Swap memory (used at 100%) : this hosting 14 websites

My question is mainly on the second server.

I would like to increase the swap memory by following this : Swap - Debian Wiki

But when I run this command, nothing happen

root@:~# swapon -a
root@:~#
Plesk running on sda1

root@:/# cat /proc/partitions
major minor #blocks name

8 0 1048576000 sda
8 1 1048574959 sda1

So if I run this command i get :

root@:/# swapon /dev/sda1
swapon: /dev/sda1: read swap header failed
root@:/#

And then I checked this file, but not sure about the details of it :
# /etc/fstab: static file system information.
UUID=af5f8c82-a495-40e0-b3e6-f361abeec5a4 / ext4 errors=remount-ro 0 1

//swapfile none swap sw 0 0

I would try to increase the swap memory at least to 4 194 304 kilobytes
 
This isn't a Plesk thing as this is all OS based.

With that said, depending on who you use for the VPS it could be as easy as just making the adjustment through the portal (Linode lets you adjust the swap through the portal itself and it does everything for you) or you can follow How to Add Swap Space on Debian 10 Linux as this article looks to be more correct for Debian 10.
 
Ok thanks for information

But how to edit /swapfile when is inuse by the system

and without affecting all the production vhost
 
I would like to increase the swap memory by following this : Swap - Debian Wiki
No, you didn't follow that. You neither created a new partition nor a new swapfile to prepare with mkswap and then use with swapon.
But when I run this command, nothing happen

Plesk running on sda1
Be glad it didn't work, otherwise you would have overwritten your OS partition.

But anyway, that there is no swap entry in your fstab means that it is configured on the host. Nothing you can do about it from inside your vps.
(And that is good, because it is one thing to use swap when your physical RAM is full to prevent the host from killing stuff to free RAM, but another to use swap and steal IO bandwidth from the other VPSes just because your assigned RAM is full. The swap you have now is probably on a ram disk and not on physical storage and only there because some software doesn't react well to there not being any swap.)
 
Thanks to @scsa20 by following the tutorial for Debian 10, then i used sudo swapoff -a and swapon to restart and take the new configuration of 4Go.
I also adjust swappiness value to 40, since there is many vhost running on this VPS.

And @mow it's look like that I can configure on the host.
 
Back
Top