Tag Archives: memory

Avoid This When Tuning MySQL Query Cache for Performance

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 to be that more is better. Since the server has free RAM available, setting MySQL Query Cache […]

PHP memory_limit – understanding and increasing this setting

PHP memory_limit is per-script, just as a highway speed limit is per-vehicle. What happens when a web host blames PHP memory_limit setting for memory usage issues on a Linux web server. For example, although PHP’s memory limit may be set high to 1GB, that does not mean that scripts will pile up to use that […]

Linux Performance: Why You Should Almost Always Add Swap Space

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

Tuning MySQL: my.cnf, avoid this common pitfall!

Caution: Don’t overwrite your entire my.cnf at once when tuning MySQL. One or two changes per restart, benchmark, then continue. Take backups first and be careful! It took me some time to decide the title for this article. MariaDB has been fast replacing MySQL as a growing number of Linux distributions now default to MariaDB over MySQL. In […]

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). Yum! Update all packages – yum package manager First, login to your new Amazon Linux EC2 instance […]

Are You Measuring Web Server Memory Usage “Correctly”?

Does the screen capture above from New Relic look familiar to you? Lets say you have a web server with 2 gigs of RAM or maybe 256 gigs. But your web applications are running slowly so you check New Relic and unfortunately don’t see any red flags. The swap may worry you a little bit but you say… “Hey, […]