Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in Web

Disabling old wordpress comments

webDec 29, 2006 1 min read

As with most individuals that manage a blog, I get inundated with comment spam. Based on some research I did, it looks like almost all of the blog spam occurs for older posts, especially those over 30 days old. Based on this information, I decided to disable comments for all old posts older than 30 days. It turns out that you can't do this directly from wordpress without a plugin, so I decided to adjust the "comment_status" column in the wp_posts table directly…

$ read more →

Buffering Apache logfiles with the BufferedLogs directive

webDec 21, 2006 1 min

On busy web servers, the process of writing to the access_log can sometimes overwhelm the spindles in a server. In Apache 2.0.41, the developers added the experimental "BufferedLogs" directive to buffer access_log entries in memory, and write them out as a single group. The documentation indicates that setting "BufferedLogs" to "On" enables buffered logging, but I couldn't find anything that described how to configure the size of the buffer. After a bit of poking around in mod_log_config.c, I noticed that the size of the buffer was controlled by the LOG_BUFSIZE macro: To see what LOG_BUFSIZE was set to, I searched for the value in mod_log_config.c…

$ read more →

Measuring website latency with http_ping

webmonitoringdevelopmentDec 18, 2006 1 min

A year or so ago, I modified my ldap-ping.pl script to create a script (http-ping.p l) that would measure the time it took to retrieve a specific URI from a web server. While scouring the OpenBSD ports collection for website monitoring tools, I came across http_ping. This is a great tool for measuring the time it takes to retrieve a URI, and is a far superior tool to the one I wrote. Here is an example of http_ping in action: There are all kinds of nifty pieces of software stashed away in the OpenBSD ports collection, and I am on a mission to locate and blog about each and every one of them…

$ read more →

Speeding up wordpress

webNov 18, 2006 3 min

Wordpress has become one of the most popular blogging engines on the Internet, and has numerous features that make blogging simple and easy. While there are numerous upsides to using wordpress, there is also one major drawback. Wordpress generates each blog entry dynamically from a database, which can cause a considerable drain on computing resources. To get a better idea of just many resources wordpress would consume on a 2GHZ/1GB AMD Athlon server, I decided to run a few tests with the siege web benchmarking utility…

$ read more →

Securely backing up a wordpress configuration to a remote location

webNov 1, 2006 1 min

I have been using wordpress as my blogging engine for quite some time. To ensure that I can recover my blog in the event of a disaster (a good example would be a server catching on fire), I take weekly backups of the MySQL database that stores my posts and the wordpress configuration.Since the wordpress backups are relatively small, I typically use mysqldump to extract the data from the MySQL database, and openssl to encrypt the data. This allows me to email my backup to a remote location, and ensures that prying eyes cannot view any data that might be sensitive. To accomplish this, I use the following shell script: This solution has worked well for me for the past two years, and I have never had a problem running openssl with the "-d" (decrypt data) option to decrypt the data that openssl's "-e" (encrypt data) option produces…

$ read more →