Experience OpenLiteSpeed
Howdy! Today I will be tuning the underlying webserver that is running this WordPress application. My hope is to reduce overall CPU load as well as to get experience with more advanced settings. Hopefully I can teach you a thing as well.
HTTP Servers and History
Apache is the OG web server. Released in 1993; its daemon name within Linux is httpd. It serves HTML files over the HTTP protocol using port 80. To accomplish this, each connection spins up a thread on the CPU to grab and serve the content. As long as the connection remains active, so does the thread. This improves latency when loading additional pages. However if the underlying webserver is not well equiped for the load, these concurrent CPU threads can eventually overload the server.
The next big webserver is NGINX. Released in 2003 it was originally a proxy software that has evolved into a full fledged HTTP server. Instead of a process/thread heavy design, they created an event-driven method. This allows a single thread to remain open at all times serving HTTP requests. Once this thread cannot process anymore concurrent events, it will spin us another thread. This is considered horizontal scaling. This allows NGINX to serve more page visitors with fewer overall resources.
About OpenLiteSpeed
OpenLiteSpeed is an open-source project hosted on GitHub under the GPLv3 license. It is published by a group known as LiteSpeedTech. Their organization appears to offer this free and open-source product along with a few other complementary products such as CyberPanel and LiteSpeed Enterprise Webserver.
OpenLiteSpeed is a mixture of Apache and NGINX elements combined. It features an NGINX-like event driven architecture to keep CPU utilization down while also supporting Apache-style rewrite rules. This increases compatibility in a manner that I think is advantagous for newer system administrators.
I have linked an article that folks should read. It is well written and in-depth comparing Apache, NGINX, and OpenLiteSpeed. My takeaway from this blog post is that while OpenLiteSpeed is event-driven and very quick to respond to socket requests, it has a much heavier memory footprint than its nearest competitor.
Even with this caveat, my $5/month Nanode has been running OpenLiteSpeed webserver just fine for a year with satisfactory performance and resource utilization.
Web Server Tuning & Additional Setup
Navigating into Server Configuration; I went ahead and configured the following variables…
- Server Name
- Disable Geo Location Lookup
- Certificate Administrator Email
By declaring the Server Name here and within the /etc/hosts
file, we can reduce INFO logs regarding mismatched hostnames. Next we want to disable Geo Location lookup. This will reduce CPU load during concurrent connections.
If you navigate over towards the App Server tab, you can configure and tweak the environment variables for underlying applications such as NodeJS, Ruby, and PythonWSGI. I went ahead and explicitly defined most the default values presented; except where they would exceed the resources I had available.
Additional Benefits of the One-Click Installer
While taking a deep dive into OpenLiteSpeed, I learned that PHP must communicate with the overhead webserver using a locally shared socket. LiteSpeed PHP is an API interface for the OpenLiteSpeed webserver and the PHP application. Using this API and some additional logic OpenLiteSpeed, LSPHP, LiteSpeedCache can perform cacheing, minifying, and other optimizations faster and smoother than typical “php-fpm” of “mod-php” deployments.
2024
Secure Your Linux Box
Matt’s Guide to Securing a Linux Box for Production.
My Website Architecture
Quick overview of my websites architecture.
Exploring Glacier National Park
One Night in Glacier NP - 2024
Images from the Nebraska DLC
Exploring and capturing the scenery in American Truck Simulator, Nebraska DLC
Sail High Seas Safely!
how-to be safe while downloading linux isos.
Jackson-Faulkner Family Trip 2024
Exploring South Dakota with the Jacksons.
Serving Up WebP instead of PNG
how I reduced my home page 610 percent.
Javascript Cat!
how-to add oneko.js to the minimal-mistakes jekyll template.
Growing Cannabis Notes
My personal running notes for growing cannabis.
SMB Mount Errors found in dmesg
Dealing with CIFS errors between TrueNAS and Debian.
Bounce a Juniper Switchport
how-to bounce a Juniper JunOS switchport.
Fixing apt error, ‘list of sources could not be read’
how-to fix ‘the list of sources could not be read.’ when using apt.
Basic Network Troubleshooting
how-to troubleshoot a home network, by a Network Engineer.
Moving to Caddy
Moving my webserver from OpenLiteSpeed to Caddy
Could Not Resolve Error in apt
how-to resolve, could not resolve packages.adoptium.net
Responding to XZ-Utils Vulnerability
how-to validate XZ-Utils impact.
Ninite is Awesome
How and Why I use Ninite
Certbot Renewal on OpenLiteSpeed
Manually renewing Certbot on OpenLiteSpeed
YABS Results
Yet Another Benchmark Results
Basic Linux Administration
Linux Basics and Core Concepts by Matt F.
How to Setup and Manage a Web Domain
how-to Buy and Manage a Web Domain
Learn Linux in 5 Days
My Udemy Course Completion Certification.
2013 Scion FRS Service Manual
Scion FRS Service Manual Download and Sources
My Discord Server
My Discord Server Widget
Migrating to BunnyCDN
How I moved from QUIC.Cloud to BunnyNet CDN.
2023
99.99% Uptime Goal for 2024
My High Uptime Plan for 2024.
Magic The Gathering Notes
Personal notes for Magic the Gathering
HTML Hobbiest Webring
HTML Hobbiest Webring Landing Page/Post
Ditching WordPress
Method of Procedure for migrating from WordPress to plain HTML.
W900 Tuning Pack
W900 Tuning Pack DLC Review.
Goodbye Google Domains
Google Domains is Ending.
Experience OpenLiteSpeed
Deep dive into OpenLiteSpeed webserver.
Struggles with Jekyll and Cloudflare Pages
how-to resolve my Jekyll/Cloudflare Pages deployment error.
Mom Said Redefine Success
In High School I had one dream that stands out. Own a Porsche by the time I was 26. Looking back, I have no idea where this dream came from; because I was ra...
Cow Town Hoe Down - 2023
Personal ramblings about my new town.
Knowledge Sharing
Knowledge Filled PDF Bundle
Jellyfin Guide for Friends and Family
how-to Jellyfun.
My ProtonMail Review
ProtonMail Review - 1 Year
2022
Managing Pi-Hole - A Guide for Beginners in 2022
how-to manage Pi-Hole.
Matt’s Desktop Build in 2022
My new Gaming PC. Its boring but it’ll do.
Ad-Blocking on the Go using Pi-Hole and Pi-VPN in the Cloud
how-to setup Pi-Hole and Wireguard on Linode.
How To Change The Hostname of a Raspberry Pi
how-to update the hostname of a Raspberry Pi.
2021
Using A Raspberry Pi Zero To Host a VPN Server
Can a Raspberry Pi Zero host a family VPN Server? Yes.
Logitech G413 Carbon - Keyboard Review
Logitech G413 Keyboard review.
Razer Huntsman Mini - My First Keyboard Review
Razer Huntsman Mini review.
Weekend with the Bois - June 2021 Video
YouTube video cruising through Colorado!
PiAware - One Month of Ownership
Ramblings about PiAware after one month of operation.
Setup a Headless Raspberry Pi - For Beginners
Guide to setup a Raspberry Pi from start to finish!
Setting the Timezone on your Raspberry Pi 4
Guide to configuring the Timezone on a Raspberry Pi.