High performance WordPress
Of all the WordPress installations I manage, two of them bring in a rather large number of hits.
To speed up WordPress I usually just enable the MySQL query cache and install the eaccelerator PHP opcode cacher. On one particular box, an Intel 1.3Ghgz PIII this increased performance from around 3 requests per second to around 10.
Recently I came across the WP-Cache plugin for WordPress. This takes the finished output from any given wordpress request and caches it to disk, serving directly from the static cache for the next hour (configurable). Any new posts or comments in the mean time immediately mark the cached version stale, so you don’t need to wait around for an hour.
On the same hardware and blog, this increases performance from 10 requests per second to over 250. A 2500% increase in speed.
(more…)
Desmond Dekker Dead
Desmond Dekker played at my local university (Leeds) earlier this month. We saw the posters and planned to go but messed up the dates and missed it.
15 days later the man is DEAD. Last gig he did too.
Chávez is a threat
Chávez is a threat because he offers the alternative of a decent society.
Fact-deprived attacks on Chávez in the Times and the Financial Times this week, each with that peculiar malice reserved for true dissenters from Thatcher’s and Blair’s one true way, follow a travesty of journalism on Channel 4 News last month, which effectively accused the Venezuelan president of plotting to make nuclear weapons with Iran, an absurd fantasy.
In contrast, Tony Blair, a patrician with no equivalent democratic record, having been elected by a fifth of those eligible to vote and having caused the violent death of tens of thousands of Iraqis, is allowed to continue spinning his truly absurd political survival tale.
John Pilger – http://informationclearinghouse.info/article13026.htm
Leeds Bus Crash
This bus narrowly missed a Subway franchise in Leeds and crashed into an Ainsleys instead. Ethical dilemma: if you were a dissenting bus driver would you choose to plough into Subway rather than Ainsleys knowing that whilst it’s a bigger and eviller chain, you might hurt more people?
I think the easy answer to this is to crash into both places, but make sure you do it after hours when the place is closed. More photos here. I didn’t take them though; I plucked them from the grape vine.
RAF doctor Iraq court martial
The BBC has done a pitiful job of covering the court martial of RAF doctor Flt Lt Malcolm Kendall-Smith who defied orders to return to Iraq citing the illegality of the war.
The prosecution said “it was not Dr Kendall-Smith’s responsibility to question the legality of orders given to him”.
Well, actually, it is. In fact, by law, not only is he to question the legality, he is to question to morality of orders too. As was established before the Nuremberg trials, a soldier cannot use “just following orders” as a defense against criminal prosecution. The London Nuremberg Charter explicitly stated that. The US Uniform Code of Military Justice was ammended after World War II to reflect it. This was all part of the reformation of International law.
I didn’t happen to notice any of this relevant information in the BBC article. I guess they had diverted journalistic resources to covering the all-important Da Vinci Code trial.
Condoleezza Rice Liverpool/Blackburn protests
George Bush’s No 2, Condoleezza Rice, is coming to En-ger-land. She’s not leading an invasion (ha!), she was invited by Jack Straw. During her time here she’ll be visiting Liverpool and Blackburn. Get yourself down to the organised protests on Friday 31st March in Liverpool and Saturday 1st April in Blackburn. Read more at www.condiwatch.co.uk.
UPDATE: I took some photos on Friday night at the Royal Philharmonic in Liverpool. I hearby throw this set of photos into the public domain. Do with them as you wish.
ANOTHER UPDATE: Fixed the link to the rest of the photos. Duh
Lighttpd and Ruby on Rails: Secure and Fast Downloading
When controlling access to files on a webserver developers often use the web application itself as a file server. The request comes in, the script checks for some session authentication variable or something, then streams the file from disk (hopefully from outside the webroot) to the browser.
The problem with this from a performance standpoint is that a thread/process of the web application has to be running for the entire duration of the download. With a busy webserver serving many concurrent downloads, this is an immense overhead. The web server itself should be orders of magnitude faster at serving files directly than via a web application, but you can’t just stick the files in a different directory and hope nobody finds the secret urls. The new web server on the block, Lighttpd, has some clever solutions for this problem.
(more…)
TCP, NAT and 2MSL mismatch
We have a client that connects over the NHS internal network to a server hosted at our site. We have lots of clients like this, but these are slightly different because they NAT all their machines to one IP before it gets to us.
Recently they complained about connection problems and after lots of investigation we managed to get a packet capture of the problem (IPs changed of course):
1 0.00 192.168.0.1 -> 10.0.0.254 TCP 2268 > 80 [SYN] 2 0.00 10.0.0.254 -> 192.168.0.1 TCP 80 > 2268 [SYN, ACK] 3 0.01 192.168.0.1 -> 10.0.0.254 TCP 2268 > 80 [ACK] 4 0.08 192.168.0.1 -> 10.0.0.254 HTTP POST 5 0.24 10.0.0.254 -> 192.168.0.1 TCP 80 > 2268 [ACK] 6 0.23 192.168.0.1 -> 10.0.0.254 HTTP Continuation 7 0.24 10.0.0.254 -> 192.168.0.1 HTTP HTTP/1.1 200 OK 1365 8 0.24 10.0.0.254 -> 192.168.0.1 HTTP Continuation 9 0.24 10.0.0.254 -> 192.168.0.1 TCP 80 > 2268 [FIN, ACK] 10 0.29 192.168.0.1 -> 10.0.0.254 TCP 2268 > 80 [ACK] 11 0.31 192.168.0.1 -> 10.0.0.254 TCP 2268 > 80 [FIN, ACK] 12 0.31 10.0.0.254 -> 192.168.0.1 TCP 80 > 2268 [ACK] 13 0.34 192.168.0.1 -> 10.0.0.254 TCP 2268 > 80 [ACK] 14 68.26 192.168.0.1 -> 10.0.0.254 TCP 2268 > 80 [SYN] 15 71.18 192.168.0.1 -> 10.0.0.254 TCP 2268 > 80 [SYN] 16 77.13 192.168.0.1 -> 10.0.0.254 TCP 2268 > 80 [SYN] 17 98.25 192.168.0.1 -> 10.0.0.254 TCP 2268 > 80 [RST, CWR]
Grammatica, Proofreading and copy editing
Louisa has started a proofreading and copy editing company. It’s based in Leeds and is called Grammatica. As in Battlestar Grammatica. My guess is that the Cylons probably had a built-in spelling and grammar checker, but they weren’t likely to help the humans, who instead turn to Grammatica.
They’ll help out with lots of stuff including (but of course not limited to) sales brochures, reports, research bids, university assignments, academic articles and even proof read your CV.
Disabled with boredom
Disabled with boredom
hands sticky with distraction
My screen is my sandpit
into which I stick my mind
Outside my window
the green and grey
Click and drag, click and drag
the squirrels laugh at me
Shoulders back in apathy
throw good posture to the wind
Attention tentitively tortured
pay rise
I changed his life through webdev
A couple of months ago I was having an IM conversation with an old web developer work friend and asked him if he’d played with Ruby on Rails yet. He told me not and I enquired as to whether he’d been living in a mud hut within a rain forest for the last year. He told me not. I pointed him in the right direction and he said he’d take a look sometime.
Today, after no further conversion, I got this message from him:
(16:14:48) Sid: Hey John!! Just wanted to say thanks for introducing me to Ruby on Rails.. I’ve picked up on it and its changed my life. Now I’m working a contract for the government and dating a hot american chick from new york. btw – like the photo. its class.
(16:16:16) Sid logged out.
He used to be a Coldfusion developer. After finding Ruby on Rails he must look back on Coldfusion and laugh up hard matter from his lower intestine.
Anybody else want to comment on how I’ve changed their life? If you only met me once and had to spend the rest of your life avoiding me it still counts.