Entries tagged 'OCI'
Back on Linode
For some reason I couldn’t keep the the instances I was setting up on Oracle Cloud Infrastructure (OCI) from eating themselves when I did something fancy like run apt-get update
, so I moved everything back to Linode ($100 referral credit there) on one of the lowest-price Nanode compute instances.
I took the opportunity to rebuild the host on Debian just to give that a spin. My setup runs on containers managed by docker-compose
, so the underlying system doesn’t matter to me that much.
I should probably be using this as an opportunity to learn some infrastructure-as-code tools.
Oracle Cloud Agent considered harmful?
Playing around with my OCI instances some more, I looked more closely at what was going on when I was able to trigger the load to go out of control, which seemed to be anything that did a fair amount of disk I/O. What quickly stuck out thanks to htop
is that there were a lot of Oracle Cloud Agent processes that were blocking on I/O.
So in the time-honored tradition of troubleshooting by shooting suspected trouble, I removed Oracle Cloud Agent.
After doing that, I can now do the things that seemed to bring these instances to their knees without them falling over, so I may have found the culprit.
I also enabled PHP’s OPcache and some rough-and-dirty testing with good ol’ ab
says I took the homepage from 6r/s to about 20r/s just by doing that. I am sure there’s more tuning that I could be doing. (Requesting a static file gets about 200 r/s.)
By the way, the documentation for how to remove Oracle Cloud Agent on Ubuntu systems is out of date. It is now a Snap package, so it has to be removed with sudo snap remove oracle-cloud-agent
. And then I also removed snapd
because I’m not using it and I’m petty like that.
Fall down, go boom
I am either really good at making Oracle Cloud Infrastructure instances fall over, or the VM.Standard.E2.1.Micro
shape is even more under-powered than I expected. I had been using the Ubuntu “minimal” image as my base, so I thought I would try the Oracle Linux 8 image and I couldn’t even get it to run yum check-update
without that process getting killed. That seems like a less-than-ideal experience out of the box.
What seems to happen on the instances (with Ubuntu) that I am using to host this site is that if something does too much I/O, the load average spikes, and things slowly grind through before recovering. The problem is that something like “running composer” seems to be too much I/O, which makes it awkward to deploy code.
Another thing that seems to get out of control quickly is when I reindex the site with Meilisearch. Considering there is very little data being indexed, that obviously shouldn’t be causing any sort of trouble. I have two instances spun up now, so I can play with the settings on one without temporarily choking off the live site. It’s probably just a matter of setting the maximum indexing memory in Meilisearch’s configuration or constraining the memory on that container.
I also added a OCI Flexible Network Load Balancer in front of my instance so I can quickly switch things over to another without waiting on any DNS propagation. Maybe if Ampere instances ever become available in my region I will play around with splitting the deployment across multiple instances.
Coming to you from OCI
After some fights with Deployer and Docker, this should be coming to you from a server in Oracle Cloud Infrastructure. There are still no Ampere instances available, so it is what they call a VM.Standard.E2.1.Micro
. It seems be underpowered relative to the Linode Nanode that it was running on before, or maybe I just have set things up poorly.
But having gone through this, I have the setup for the “production” version of my blog streamlined so it should be easy to pop up somewhere else as I continue to tinker.
Making a smaller footprint
I have been working on shutting down some of the (virtual) servers that we used for the store and other things. There were three: one for the store’s website, one for some WordPress sites/blogs, and one for this site.
The server hosting the store was the most expensive one, but now the site has been reduced to just a couple of static pages, I set those up to run off Bunny.net (that’s a referral link). That should cost a few pennies per months, so the $40 credit I have should cover that indefinitely.
I haven’t figured out what to do with the WordPress blogs, but none of them are active and I’ll probably just turn them into static sites and host them on Bunny.net, too.
The last thing is this server which could be a static site but I like tinkering my little blog engine and think I want to keep it dynamic. I may move the hosting over to Oracle Cloud Infrastructure (OCI) because they offer some “always” free services that would be more than adequate. I have been really curious to play with their Arm-based compute servers but there has been no availability in the region I picked when signing up.
I need to decide how I want to set up the server on OCI to run this. I’m currently using a pretty simple docker-compose.yml
setup to handle running a php-fpm
container, a MySQL database server, and Sphinx, with the system nginx
fronting things. I already know I want to replace Sphinx, and I think I want to try using Caddy on the front. I guess if I really wanted to be extra and take advantage of the free resources from Oracle that I’d spin up an Autonomous Database instead of using MySQL.
Between credits I have with Bunny.net and Oracle’s free offering, I’ll be paying almost nothing for hosting all of this except for the domain name renewals. That soothes my cheapskate soul.