Questions about ZFS, Swap

eugeniopacheco

New Member
Aug 27, 2015
7
0
1
Hi,

First of all, I'd like to congratulate everyone from Proxmox for this wonderful software. It's simply amazing.

I have some questions as I'm still trying it.

1) Swap. From what I have read on openvz's documentation, it is recommended to have twice as much RAM for swap. So if my system has 32GB RAM I'm supposed to have 64GB of Swap. I have used this for a long time on my servers without any trouble. On Proxmox, when installing using ZFS mirror, it installs the server with only 32GB swap. How can I increase it afterwards? I have read on ZFS documentation that I can increase it by using the following command:

# zfs set volsize=64g rpool/swap

I used it, but for some reason the system still recognizes my swap as 32GB:

# free -m
total used free shared buffers cached
Mem: 32139 19477 12662 0 2 1935
-/+ buffers/cache: 17539 14599
Swap: 31743 0 31743
# zfs get volsize rpool/swap
NAME PROPERTY VALUE SOURCE
rpool/swap volsize 32G local
# zfs set volsize=64g rpool/swap
# free -m
total used free shared buffers cached
Mem: 32139 19507 12631 0 2 1935
-/+ buffers/cache: 17569 14569
Swap: 31743 0 31743

I also tried swapoff/swapon with no success before setting the volsize.

Is it possible to change this?

2) I noticed that swap isn't being used at all. It seems that the swapiness of proxmox has changed a lot over the time (from what I read online). As you can see from the free -m command above, it is using 0 swap and all RAM. Is that normal behaviour? If I get out of memory, will it start using swap?

3) I also noticed that when creating a VM I can control network speed, but when creating a CT, I can't. I believe I would have to do it manually with htb? Am I correct?

Thanks in advance for all the help, and again, congratulations on the software. It is amazing.
 
Hi,
you are on the right way but you forgot to create the swap new to get the new size.
it is the same like when you resize a ext 4 partition.
use mkswap

2. swap can be useful if over commit your machine. but then you should have a fast ssd to swap other way your system will be very slow.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!