Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


VPS not using VSwap?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

VPS not using VSwap?

I have an OpenVZ with 256MB RAM and 128MB VSwap, but VSwap is always at 0 (in the control panel and with the free command).

The VPS keeps running out of memory and killing mariadb before the Swap is used.

The VPS was working fine before (with nginx + PHP + mariadb) but the other day I reinstalled Debian from scratch, so not sure if I need to change anything on the VPS?

Thanks

Comments

  • vingohostvingohost Member, Host Rep

    Contact the hosting provider, the ability to use swap is limited by your provider

  • Running mariadb on 256mb ram? 🔥 🔥

    Thanked by 1DeusVult
  • @vingohost said:
    Contact the hosting provider, the ability to use swap is limited by your provider

    Is it? But it's weird that it shows in the control panel (SolusVM I think)

    I guess I'll open a ticket and ask

  • @TrK said:
    Running mariadb on 256mb ram? 🔥 🔥

    It was running perfectly in the past before I rebuilt it. Maybe I configured it incorrectly? I know in the past you could definitely configured MySQL/MariaDB to use a small amount of RAM.

    Or maybe it's just the newer version of Debian. I think I was on 9 before

  • NeoonNeoon Community Contributor, Veteran

    @TrK said:
    Running mariadb on 256mb ram? 🔥 🔥

    huh, I ran that on 64MB.

    Thanked by 1DataRecovery
  • @hostnoob said: I think I was on 9 before

    That explains it, i was imagining mariadb 11 running on 256mb ram.

    @Neoon said: huh, I ran that on 64MB.

    I ran too but it was mariab 5, can't imagine the current releases running fine on less than 512mb of ram.

  • @hostnoob said:
    I have an OpenVZ with 256MB RAM and 128MB VSwap, but VSwap is always at 0

    Check whether cat /proc/sys/vm/swappiness is not zero.

    Just in case, it's in the /etc/sysctl.conf file.

    Although I'm unsure whether you can edit that setting on OpenVZ. Most likely can be done by the provider only.

    @Neoon said:

    @TrK said:
    Running mariadb on 256mb ram? 🔥 🔥

    huh, I ran that on 64MB.

    Noobs will run out of memory just after reading this comment B)

    Thanked by 1M66B
  • @DataRecovery said:

    @hostnoob said:
    I have an OpenVZ with 256MB RAM and 128MB VSwap, but VSwap is always at 0

    Check whether cat /proc/sys/vm/swappiness is not zero.

    Just in case, it's in the /etc/sysctl.conf file.

    Although I'm unsure whether you can edit that setting on OpenVZ. Most likely can be done by the provider only.

    @Neoon said:

    @TrK said:
    Running mariadb on 256mb ram? 🔥 🔥

    huh, I ran that on 64MB.

    Noobs will run out of memory just after reading this comment B)

    yeah swappiness is set to 0 but can't be changed

  • NeoonNeoon Community Contributor, Veteran

    Was it sold with the vSwap? Then go claim it.

  • @hostnoob said:

    @DataRecovery said:

    @hostnoob said:
    I have an OpenVZ with 256MB RAM and 128MB VSwap, but VSwap is always at 0

    Check whether cat /proc/sys/vm/swappiness is not zero.

    Just in case, it's in the /etc/sysctl.conf file.

    Although I'm unsure whether you can edit that setting on OpenVZ. Most likely can be done by the provider only.

    @Neoon said:

    @TrK said:
    Running mariadb on 256mb ram? 🔥 🔥

    huh, I ran that on 64MB.

    Noobs will run out of memory just after reading this comment B)

    yeah swappiness is set to 0 but can't be changed

    That's the answer then.

    Your VM will not swap until you run out of memory (i.e. when it must swap absolutely), but probably it has not enough time to react.

    Contact support and ask for adjustments, so you can use all the swap you paid for.

  • @Neoon said:
    Was it sold with the vSwap? Then go claim it.

    Apparently it was. Had to use the wayback machine to back like 6 years lol

  • SpeedBusSpeedBus Member, Host Rep

    If it's OpenVZ 7 (ie, the OpenVZ based/running on CentOS 7) -- the vSwap implementation was changed to use the actual SWAP on the host-node (while on OpenVZ 6 vSwap it was using RAM which was slowed down or passed through as SWAP to the container/VPS (afaik).

    What could be happening in this case is, if the host-nodes swap is full, the vSwap can't.. allocate any swap to the VPS anymore, I don't remember exactly how the 0 swappiness setting from the host-node would affect the vSwap operation on the VPS, but given that you are running a LEMP stack on 256M + 128M (~384M effectively), it should swap out something pretty quickly I feel as the 256M RAM would be pretty easily filled up?

Sign In or Register to comment.