Re: [Users] Is this mkswap message from OpenVZ?

2020-01-08 Thread Paulo Coghi - Coghi IT
If your MySQL is dying because of lack of memory, this is a sign that you
need to upgrade your RAM, adding at least 1GB more, not to add swap.

I understand the economical aspect, but today the price per GB of RAM is
cheaper than ever.

If your provider is charging too much for your budget, and price is your
first priority, you can find really cheap OpenVZ options here
https://lowendbox.com/tag/openvz/

There are providers offering servers per year and others with 5GB RAM
servers for $5/month.

On Wed, Jan 8, 2020 at 5:06 PM Jeffrey Walton  wrote:

> On Wed, Jan 8, 2020 at 3:01 PM Paulo Coghi - Coghi IT
>  wrote:
> >
> > By default, OpenVZ doesn't allow swap creation inside containers. And
> this is a good thing.
>
> I think that depends on the metric used.
>
> A small swapfile would be most useful and economical for us.
>
> I think the lack of a swapfile and OOM kills are the worst choice
> because they create a DoS in practice. Users cannot access our wiki
> because MySQL was killed.
>
> Jeff
>
___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users


Re: [Users] Is this mkswap message from OpenVZ?

2020-01-08 Thread Jeffrey Walton
On Wed, Jan 8, 2020 at 3:01 PM Paulo Coghi - Coghi IT
 wrote:
>
> By default, OpenVZ doesn't allow swap creation inside containers. And this is 
> a good thing.

I think that depends on the metric used.

A small swapfile would be most useful and economical for us.

I think the lack of a swapfile and OOM kills are the worst choice
because they create a DoS in practice. Users cannot access our wiki
because MySQL was killed.

Jeff
___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users


Re: [Users] Is this mkswap message from OpenVZ?

2020-01-08 Thread Paulo Coghi - Coghi IT
By default, OpenVZ doesn't allow swap creation inside containers. And this
is a good thing.

It is not good to use storage to act as memory, since the performance is
really bad. When needing more memory, just upgrade the hardware profile of
your VM with your provider.

On Wed, Jan 8, 2020 at 3:41 PM Jeffrey Walton  wrote:

> Hi Everyone,
>
> I'm trying to track down the cause of the error message below. It is
> encountered when we try to enable a swapfile for a low-end VM. The VPS
> provider uses OpenVZ.
>
> # ./vm-swapfile.sh
> Swapfile already allocated
> swapon: /swapfile: swapon failed: Operation not permitted
> Failed to enable swapfile
>
> The relevant command is:
>
> if ! swapon /swapfile; then
> echo "Failed to enable swapfile"
> fi
>
> Is this mkswap message from OpenVZ?
>
> Thanks in advance.
> ___
> Users mailing list
> Users@openvz.org
> https://lists.openvz.org/mailman/listinfo/users
>
___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users


[Users] Is this mkswap message from OpenVZ?

2020-01-08 Thread Jeffrey Walton
Hi Everyone,

I'm trying to track down the cause of the error message below. It is
encountered when we try to enable a swapfile for a low-end VM. The VPS
provider uses OpenVZ.

# ./vm-swapfile.sh
Swapfile already allocated
swapon: /swapfile: swapon failed: Operation not permitted
Failed to enable swapfile

The relevant command is:

if ! swapon /swapfile; then
echo "Failed to enable swapfile"
fi

Is this mkswap message from OpenVZ?

Thanks in advance.
___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users