Tag: performance

Reduce PNG sizes from Mac Finder

When I save a screenshot on my systems, it doesn’t try to automatically crush/minify the PNG. Here’s how on a Mac I’ve added a context menu item for images to crush them. This can help save storage space or make web pages load faster. Ensure you have pngquant installed. Other tools may work for you,

MemcacheD is your friend

MemcacheD Is Your Friend is an object caching plugin for WordPress that offers faster access to cached objects, especially if your database happens to reside on a different host. The problem this time around is that it scopes some of its members as private, and as a result, is incompatible with some plugins. I’ve run

Prolong the life of the SD card in your Raspberry Pi

The web is littered with stories of people who love their Raspberry Pis but are disappointed to learn that the Pi often eats the SD card. I’ve recovered a card once, but otherwise had a few that have been destroyed and were not recoverable. I’ll lay out how I use This One Weird Trick(tm), ahem,

Finding how much time Apache requests take

When a request is logged in Apache’s common or combined format, it doesn’t actually show you how much time each request took to complete. To make reading logs a bit more confusing, each request is logged only once it’s completed. So a long-running request may have an earlier start time but appear later in the

Speed of the sort command

GNU sort is normally crazy fast at what it does. However, recently I was trying to sort & unique several huge files and it seemed to be taking way too long. I did a little googling, and realized that it takes a lot longer to sort the full range of Unicode characters because it has

Apache, Fastcgi, PHP 7 on Debian Wheezy & Ubuntu 14.04

Intro: The Tyranny of Prefork There are a lot of tutorials out there that go through the rote instructions on upgrading your Debian or Ubuntu system to use PHP 7. While I’m sure most of them are fine, they assume you’d want to use the prefork process model or event/threaded via CGI (via proxy and

WordPress performance problem with many posts

If you have a ton of posts in your WordPress blog (we have over 35K in one site at work), it turns out that the Previous and Next links on each post may be running a tough query on your database. I wanted to know why MySQL was using so much CPU and wrongly assumed

Raspberry Pi SSH cipher speed

I was curious to see how quickly I could transfer files to my Pi using SSH rather than FTP. Obviously using FTP is way faster than almost any other method, but still I wanted to see how fast I could transfer data over SSH. Here’s the time it took to transfer a 50 MB file

APC is dead, long live APCu & ZendOpcache

So far, the site seems slightly snappier now that I’ve replaced the venerable (but old and unmaintained) APC with APCu for user-space object caching and ZendOpcache for opcode caching. Various people report seeing 10-30% improvement in speed with the new opcode cache / optimizer that will be the default in PHP 5.5. Also APCu is

Faster webserver on Raspberry Pi

The Raspberry Pi has a 32-bit ARM CPU running at 700MHz by default, although you can usually overclock them somewhat and still enjoy stable behavior. I’m running Raspbian, a Debian-based distribution built for the Pi. One thing that’s mildly annoying is that running WordPress on the Pi using Nginx and php-fpm has been dog slow,

Why no alternate compression algorithms in rsync?

I was thinking the other day, gzip is all fine and good, but why doesn’t rsync support other compression methods? There are a few use cases where using LZO (a very low latency compression algorithm) would be a better choice. One such case would be when operating with a relatively slow CPU, such as on

gzip by default

In my lastĀ post on gzip, I discovered that gzip can compress data in a more sync-friendly way. This totally unrelatedĀ blog entry from nginx discusses a new gunzip filter that decompresses compressed data for clients that don’t support gzip. I was thinking about this the other day. Why not store all your content compressed, then you