Could not increase number of max_open_files to more than… (Solution)

A quick solution to the warning “Could not increase number of max_open_files to more than” when starting MySQL or MariaDB. For some background, read How MySQL Opens and Closes Tables. Here’s an excerpt: “The table_open_cache and max_connections system variables affect the maximum number of files the server keeps open. If you increase one or both of […]

What is iowait and how does it affect Linux performance?

I/O wait or iowait, wait, wa, %iowait, or wait% is often displayed by command-line Linux system monitoring tools such as top, sar, atop, and others. On its own, it’s one of many performance stats that provide us insight into Linux system performance. I/O wait came up in a recent discussion with a new client. During our […]

Free vs. Available Memory in Linux

At times we will need to know precisely how our Linux systems use memory. This article will examine how to use the free command-line utility to view memory usage on a Linux system. In doing so, we will clearly define the difference between free vs. available memory on Linux systems.   Free vs. Available memory […]

PHP Performance: Additional CPU cores vs Faster CPU cores

Some time ago, I received an email from a client experiencing slow performance issues with a LEMP (Linux, Nginx, MySQL, and PHP webserver). During a full audit, I found that the server’s load average was pretty low (see above screenshot). However, the website was indeed very slow. There were some misconfigurations, but one of the […]

Linux top: Here’s how to customize it

The top command – referred to below as Linux top – is a command on Unix and Unix-like systems such as Linux, which provides a dynamic real-time overview of a running system. It can display system summary information and a list of processes or threads currently managed by the Linux kernel. The types of system […]

Disable cron emails (solution)

Cron is a daemon that executes scheduled commands. More specifically, the software utility cron is a time-based job scheduler for Unix-like operating systems like Linux. You can use Cron to set up jobs to run periodically at fixed times, dates, or intervals. Cron is an extremely powerful tool because just about anything you can type from […]

Are you measuring Linux web server memory usage correctly?

This article was first published in 2014. Afterwhich, there was a welcomed change to the Linux kernel in 2016; as mentioned in the 2017 article: Does your Linux server need a RAM upgrade? Let’s check with free, top, vmstat and sar. As outlined here, memory is now marked as available by the Linux kernel: “Estimation of […]

Linux Performance: Almost Always Add Swap. Part 2: ZRAM

Previously, we looked at how swap space, particularly swapping, can severely slow down Linux performance. We then tweaked Linux kernel parameters to better use server memory and avoid heavy swapping. That article created some debate and good arguments for and against swap space. For example, if you have more than enough memory available, wouldn’t it […]

Nginx tuning tips: TLS/SSL HTTPS – Improved TTFB/latency

Since 30th June 2018, the PCI Security Standards Council has required that support for SSL 3.0 and TLS 1.0 be disabled and, more recently, to disable TLS 1.1. Using TLS 1.2 and 1.3 is strongly recommended. In addition, as of July 2018, Google Chrome began to mark ‘HTTP’ websites as “not secure.” Over the past […]