Problem with memory consumption on the server

Newx

New Member
Dec 14, 2022
12
0
1
I have a problem with memory consumption on my server.

I have a server with 128GB of RAM.

I created two VPSs and divided the RAM between them, leaving 12GB for Proxmox, which I believe would be enough for it.

However, when I turn on both VPSs, everything is OK, the consumption stays around 5GB, and then suddenly the problem starts.

As I run functions on the VPS, the consumption goes up, but it doesn't go down. It just keeps getting higher and higher until it runs out of RAM on the server.

The VPS either shuts down or everything crashes, and then I just have to restart it. It's strange that this started recently.

After I created a new VPS with AlmaLinux, because the old one was using Centos 7 with cPanel and since it was having problems with cPanel, I decided to migrate to Alma Linux.

Worse still, for example, if there is 15GB in use now on the server in total, if I do something like a backup on the VPS, the consumption increases and does not go down, from then on it only increases.

Strange, when I look at the VPS, the consumption is not even at 2GB of use.

If anyone can help.

I don't know if it could be something in the configuration

=== conf VPS
vps-xxxx.png
 
Modern OS use RAM for caching, not only Windows VMs. Beside that, if you use ZFS for VM storages, the ARC (cache) grabs an additional amount of RAM.
 
I used this server for months and never had this problem. It started when I created this new VPS.

For example, yesterday I had to restart the VPS because the memory was running out.

When I made a backup yesterday, the memory went up again and now it is consuming 96GB and the VPS is not consuming even 2GB.

In other words, when I make the next backup, it turns off or freezes everything.

I need to solve this problem.

Can you tell me if I rearrange the RAM on the server with the VM already created, it could break the VPS.

And the CPU.
 
If anyone can help, I have this problem. Almost every time I back up accounts on the VPS, the VM is consuming excessive RAM.

Which ends up inflating the total RAM and causing the server to crash.

What's worse is that the VPS itself isn't using all of this RAM.

I don't know if I should do a ballooning adjustment. If I adjust it up or down, the doc says to always adjust it to half. For example, if I have 80GB on the VPS, adjust the minimum to 40GB.

Is that right, or did I misunderstand?
 
If anyone can help, I have this problem. Almost every time I back up accounts on the VPS, the VM is consuming excessive RAM.
Upgrade to the latest 8.2 and enable fleecing. Or make sure the VM stops writing (so much) to disk during the (long) backup, by shutting it down or using the stop backup mode.
Note that 7.4 will be out of support in a few days adn you're on 7.3.

EDIT: Apologies for misunderstanding. Let me know if you want me to remove this post that is apparently not relevant.
 
Last edited:
  • Like
Reactions: Newx
Olá, você não entendeu.

Não estou me referindo a backups de VPS usando Proxmox.

Estou falando de backups dentro do VPS. Por exemplo, tenho o cPanel instalado e quando executo ações.

Exemplo

1 No servidor principal onde o Proxmox está instalado, o consumo de RAM é de 10 GB.

Agora meu servidor começa a fazer backups das contas do cPanel.

2 O consumo de RAM vai até 20 GB no servidor principal.

3 Esse consumo continua aumentando até que o servidor trave, o VPS desligue ou tudo congele.

E é isso que está acontecendo.
 
Upgrade to the latest 8.2 and enable fleecing. Or make sure the VM stops writing (so much) to disk during the (long) backup, by shutting it down or using the stop backup mode.
Note that 7.4 will be out of support in a few days adn you're on 7.3.

EDIT: Apologies for misunderstanding. Let me know if you want me to remove this post that is apparently not relevant.

I'll look into this update issue.

What's happening is poor RAM management in the system.

To alleviate the problem in the two VMs I have, I activated Ballooning.

Following the manual doc, I adjusted the minimum RAM according to the specified physical memory.

Example

In a VM, I have a minimum of 82GB; I specified 41GB.

I tested it by freeing up available memory and it worked.

What happens is that whenever my VPS starts backing up hosting accounts, it allocates xxxx of memory. This memory seems to be stored on the main host as a fixed cache memory. The correct thing to do would be to free up the available RAM when it's not in use, which isn't happening.

So, for example, if during the backup, VPS 1 took 10GB, this RAM would be permanently blocked on the host.

If the next day there was another backup and another 20GB was taken, for example, it would total 30GB and the RAM would not be cleared when it was not in use.

So I will program the cron to clear at 2 different times.

At 11:00 pm to free up space, since the backup on my servers starts at 00:00

At 8:00 am to free up space, since a backup that starts at 00:00 will consume xxxx of RAM.

I believe this should prevent the memory that is parked without being used from being blocked.

Program the cron to run this command sudo sync && sudo sysctl vm.drop_caches=3

This should temporarily solve the problem with RAM blocking on the main host.
 

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!