Tuning MySQL my.cnf? Avoid this common pitfall!

It took me some time to decide on the title of this article. MariaDB has been fast replacing MySQL as many Linux distributions now default to MariaDB over MySQL. MariaDB is an enhanced drop-in replacement for MySQL. Therein lies my predominantly self-made conundrum, MySQL or MariaDB? The MySQL tuning advice below applies to MySQL, MariaDB […]

How to diagnose OOM errors on Linux systems

Out-of-memory (OOM) errors take place when the Linux kernel can’t provide enough memory to run all of its user-space processes, causing at least one process to exit without warning. Without a comprehensive monitoring solution, OOM errors can be tricky to diagnose. In this post, you will learn how to diagnose OOM errors in Linux kernels […]

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 […]

What is iowait and how does it affect Linux performance?

iowait (wait, wa, %iowait, wait%, or I/O 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 support […]

Linux server needs a RAM upgrade? Check with top, free, vmstat, sar

Sometimes, it can be a bit of a challenge knowing if and when you should upgrade the RAM (random access memory) on your Linux server. Even more so, when deciding how much memory you should add, or if you have adequate memory, how do you make the best use of it? This article will walk […]

Are you measuring Linux web server memory usage correctly?

This article was first published in 2014. After which, 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 a server administrator or web developer, it’s your responsibility to stay informed about […]

Linux Performance: Almost Always Add Swap Space

We know that using Linux swap space instead of RAM (memory) can severely slow down performance. So, one might ask, since I have more than enough memory available, wouldn’t it be better to delete swap space? The answer is: No. There are performance benefits when swap space is enabled, even when you have more than […]

PHP memory_limit – understanding and increasing

PHP’s memory_limit is per-script, just as a highway’s speed limit is per-vehicle. For example, although PHP’s memory limit may be set to 1GB, that does not mean that scripts will pile up to use that 1 GB. Let’s take a closer look at understanding PHP’s memory_limit setting.   PHP memory_limit is a per-script setting PHP.net’s […]

MySQL Query Cache for Performance, Avoid This When Tuning

Update: MySQL query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0. – mysql.com One of the most misconfigured MySQL performance features is MySQL query_cache_size. This post references a web server with 32 gigabytes of RAM where the existing config had MySQL’s query cache size set incorrectly to 4 gigabytes. The thought behind it seemed […]

How to strip down Amazon Linux EC2 to maximize available RAM

Firstly, this article mainly applies to low memory Amazon Linux EC2 instance types such as t2.nano and t2.micro. The instructions below are also specific to Amazon Linux AMI, which like CentOS, is based on RHEL (Red Hat Enterprise Linux). Note: This article is from 2016 and applies to Amazon Linux Version 1 only.   Update […]

Top ↑