Digital Ocean graphs and upgrading droplet

I’ve a 2GB 25GB $10 Digital Ocean droplet. My forum is fairly new so all the figures are tiny, except:

  • Memory (between 75-80%, and inexplicably jumped to 85% yesterday and remains there). When I installed Discourse I went for the 2GB option rather than setting up swap memory.

  • Disk usage (78-80%). Once when rebuilding Discourse it ran out of disk space and had to clear some space before I tried again. Is there any way to clear more space (e.g. permanently deleting “deleted” topics)?

At what sort of percentage levels should I look at upgrading the droplet?

1 Like

Ok, you need to understand a couple of things on how Discourse works:

  • Discourse keeps as much memory used as it can to improve the response speeds. So, using 80% of the memory will happen in a 2GB droplet and in a well configured 16GB droplet.
  • Disk usage shouldn’t be that high unless you have a lot of attachment. You can try ./launcher cleanup to remove old images, it usually helps a lot if the server has a lot of rebuilds.

The 2GB option should have SWAP, you can start moving out of SWAP at around 4GB of memory.

4 Likes

Thanks for your advice on memory.

I will try your suggestion on disk space (I don’t have any attachments). I wonder whether it’s Digital Ocean backups/snapshots to blame.

I note from this post, which pre-dates my Discourse installation, that a swap file is set up automatically:

https://meta.discourse.org/t/create-a-swapfile-for-your-linux-server/13880/60

Maybe that’s why memory usage stays so consistently at 75-80% How would I check whether I have a swap file?

1 Like

You can run free command and check. But if you followed the installation guide most probably you have SWAP.

2 Likes

Your must nearly have sent your reply before my question! Thanks again. I’ll try your suggestions and report back.

1 Like

Memory stays at 70 percent because it’s supposed to. It’s speeding up disk access. Don’t worry. You can Google “why is Linux using so much memory” if your care why.

Did you resize your droplet? I thought that the $10/month one had 50gb of storage. You can get by with 25,though, but you’ll need to do

  ./launcher cleanup

Fairly often.

3 Likes

Yes swap was installed :slight_smile:

              total        used        free      shared  buff/cache   available
Mem:        2035548     1509908       94712      159096      430928      200948
Swap:       2097148      171008     1926140
1 Like

Well funny you should say that… I checked the “resize” tab and was presented with the following options among others:

Basic Shared CPU 1 vCPU 2 GB 25 GB 2 TB $10/mo 0.015/hr
Basic Shared CPU 1 vCPU 2 GB 50 GB 2 TB $10/mo $0.015/hr

Thanks for the tip… :slight_smile:

1 Like

Does any of this help?

# ./launcher cleanup
...
Total reclaimed space: 5.823GB
...

# df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              973360        0    973360   0% /dev
tmpfs             203552     1112    202440   1% /run
/dev/vda1       50633164 13236268  37380512  27% /
tmpfs            1017752        0   1017752   0% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs            1017752        0   1017752   0% /sys/fs/cgroup
/dev/vda15        106858     3934    102924   4% /boot/efi
/dev/loop0         56832    56832         0 100% /snap/core18/1988
/dev/loop1         56832    56832         0 100% /snap/core18/1997
/dev/loop2         33152    33152         0 100% /snap/snapd/11588
/dev/loop3         72192    72192         0 100% /snap/lxd/19647
/dev/loop4         69248    69248         0 100% /snap/lxd/20326
/dev/loop5         32896    32896         0 100% /snap/snapd/11841
overlay         50633164 13236268  37380512  27% /var/lib/docker/overlay2/c8513c82acabacccaf50e9ac0f082c1f742639944e8aef980fe3805850b5c1cd/merged
overlay         50633164 13236268  37380512  27% /var/lib/docker/overlay2/d7c85dc8bc2d7922a71795a329a59b44eb507df8896e5baf068384314d0ba1de/merged
tmpfs             203548        0    203548   0% /run/user/0
1 Like

Yes, that command just regain you 5.8GB of space. And according to the second command you only have 27% of the disk used.

3 Likes

Mega. That adds up – I was using about 20GB (80% of 25GB) and now am using about 14GB (27% of 50GB).

This thread has been really helpful. Thank you both very much.

1 Like

The price for the 50GB is the same? :thinking:

1 Like

According to their website tonight, the 25 GB basic droplet is $5/mo with 1 GB CPU, 1 TB Xfer with a rate of $0.00744/hr.
The 50 GB droplet is $10/mo with 2 GB CPU and 2 TB Xfer with a rate of $0.01488/hr.

2 Likes

@JimPas Thats right. Perhaps it was different in October 2020 and they kept me on the old contract but also allowed me to upgrade to the current deal.

@merefield Yes, same price!

2 Likes

Oh, that would make sense… and was nice of them. They must have had a price change and upped the plan for those who were already customers. Cool.

It’s funny to think of a faceless global corporation as being nice. But, yes, I suppose it is an honourable approach! Maybe they didn’t automatically upgrade the account because it would involve disruption – or be too much work to do it for many thousands of customers.

Edit: I think I remember now… you can upgrade CPU/RAM then downgrade again, but with disk space is a one-way street, so I probably went from 1GB to 2GB RAM but didn’t change the disk space so as to be able to downgrade again if necessary.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.