Microsoft is building the best products says Techdirt

Just because someone is gaining market share does not automatically mean that they have better products. Apprently the free market supporters of Techdirt are unable to understand that.

NEW YORK - NOVEMBER 30:  (NO SALES, NO ARCHIVE...
Image by Getty Images via Daylife

I’d never imagine I’d see this argument by anyone, especially by someone who aims to be an authority in tech sector reporting but it seems that ideology trumps facts. See Techdirt’s Mike’s (I assume Masnick?)  latest quote:

And, for that matter, I’d suggest that you’re wrong in your initial assessment. Microsoft beat all of the companies you listed above by creating a BETTER PRODUCT.

Lolwut.

Now let’s see

  • MS Word VS Wordprerfect
  • Exchange VS Lotus Notes
  • Internet Explorer 6 VS Opera
  • MS-Dos VS DR-Dos
  • Active Directory VS Novell Netware

There’s a lot of other products that suffered the same fate because of the way MS “competes” which has nothing to do with building better products. Indeed all tech experts were scratching their head how an upstart competitor with a clearly inferior product could be winning market share against his well entrenched opponents.

The answer of course is by anti-competitive tactics, which is to say, by doing anything else except building a better product. If there’s anything to be said about Microsoft products is that they have always been second class with a lot of bugs features that nobody wanted. And yet, they win.

Still, Techdirt seems unable to recognise this fact. This can only be because free market idealism has clouded their minds so much that monopolies and shady practices don’t even register. No, everything is fair competition as far as they’re concerned. But this is of course a fallacious reasoning as their argument goes like this.

  • Products/Companies  in the free marketwho  gain market space do so by building better products
  • Microsoft is gaining market space
  • Therefore Microsoft must be building better products.

Of course this is patently ridiculous, as the very first premise is wrong. Companies have many means in their disposal to gain market space that don’t involve building better products. From using your monopolistic market share to strong arm your allies to drop the competitor’s products, to setting fire to the other’s stores.

Wether Microsoft is gaining or losing market share is does not tell us anything about the quality of their products or their tactics from the very simple fact that correlation does not equal causation. To find out what is causing this, you need to look deeper into practices and product comparisons, something which Techdirt is apparently unwilling to do and much prefers the lazy way out.

Reblog this post [with Zemanta]

The fastest caching combo for WordPress. Am I in a cached Nirvana?

Caching in Wordpress is the best way to increase your performance. This post reviews two new plugins, Hyper Cache and DB Cache and how they can work together

Diagram of the basic operation of a cache
Image via Wikipedia

I hope you’ve recently noticed a significant improvement in the speed of the Division by Zer0.  I’ve done some further testing and I think I’ve discovered the perfect combination of tools which, at least for me, has made everything much snappier.

Last time I was playing around with Dreamhost’s FastCGI option ((Since disabled as it seemed to cause more problems than it solved)) as well as trying out a few newer caching plugins since Super Cache didn’t really play nice. Specifically I was testing Hyper Cache and DB Cache and trying to decide which one is better to keep. Well, in the end I figured out that using both is even better, and now I’m going to tell you why 🙂

Hyper Cache

This one is one serious mutha. It basically does the same thing as Super Cache but without requiring you to edit your .htaccess or other such hassle ((And removing it is simple too, unlike Super Cache)). All you have to do is activate and go. And the results are really stunning. With it activated, I routinely get pages loading in sub-second speeds (whereas before the average was 2-6 seconds) on cached pages with very low overhead, which means I can withstand traffic spikes.

I was so impressed I spent an afternoon just reloading pages to admire how fast they loaded 🙂

Of course this plugin will not help with javascripts speed so if you have a lot of ’em, you will still notice your site taking a bit. However you should notice that the loading starts immediately and then waits for each javascript to download and run (so you’ll see the page appear in stages) instead of waiting a bit until it even starts loading (while it’s gathering prerunning the php and quering the DB). As such, if you have most of your javascripts loading at the footer (as you should), your content will appear immediately for your audience to start reading, and by the time they’re one the second sentence, the page will have finished.

My main problem was exactly that incidentally, that the content took up to 5 seconds to even appear. As long as the main text is there, I don’t mind so much how long it takes for the rest of the “bling” to load.

Another good thing about hyper cache is that it will not activate if you’re logged in to your wordpress installation. This means that in order to see the speed of your site as it appears to everyone else, you either need to use another browser (I keep a konqueror lying around just for this) or to clear your cookies. On the upside, it means that you almost always see the current version when you make non-content changes, such as editing your theme (as the cache will be automatically cleared if you make content changes.) This really helps if you like to tweak your site layout a lot.

One last (bad) thing I’ve noticed is that if I go ahead and clear all hyper cache. My site will die with an internal server error. I’ve tried this twice now. I do not know if that is because my site would die if hyper cache was not there or because once the cache is cleared, there some heavy duty function running to repopulate it or whatever. I know it happens though. I don’t have to do this anymore however so it’s not really a problem.

Overall, Hyper Cache is an absolute win for people hosting their own WordPress, especially if you’re on a shared hosting plan and even more especially if you’re using Dreamhost PS, as Super Cache is not an option.

DB Cache

This plugin takes a novel approach to caching. Whereas all the other that exist simply save the html output of your content and then serve it to avoid running PHP code each time a page is requested, DB Cache saves database query output to avoid making SQL calls to it.

This has a few significant benefits. First of all, it helps with Search Engine crawlers such as the google bot. Where a normal caching plugin really shines when a lot of people access one specific page, it actually harms you when one agent accesses a lot of pages, since you add the cache-saving to your load, on top of the normal page loading. DB cache on the other hand, by caching common Database queries, can fill exactly that hole which significantly reduces the juice you need to serve all the bots crawling you.

This is becauseeach page of your site, other than the main content and possible some post-related queries (ie similar posts), has basically the same calls. Your recent posts, your tag clouds and category lists, recent comments etc, depending on what widgets and theme you use. These generally don’t change from page to page but for a normal caching plugin on a new page, they still need to be called so that the full html page can be saved.

So by caching all these common calls, you seriously reduce the time one needs to wait on a blank screen before a page can even start loading the content. You also reduce the load when a crawler does his daily thing and you even increase the speed of the occasional visitor from a mobile. While DB cache will not give you the awesome speed hyper cache will on a single page load, it will certainly reduce your overall server’s CPU & RAM load (much more important than bandwidth and disk space for shared hosting) and make visits to uncommon pages quicker.

Another plus which I’ve discovered is when you are using Gallery2 through the wpg2 plugin. Gallery is imho a database chewer because people don’t simply see one image and then leave, but rather switch quickly among a lot of them. As a result, DB Cache is perfectly prepared to grab those common queries done through wpg2 and save them for later, increasing the overall speed.

The caching combo of ultimate speed

Until now I’ve never mixed caching plugins as they all generally worked in the same or similar way. However the distinct way these two worked gave me the impression that they wouldn’t really conflict and might actually complement each other quite well. One of them is built for serving one page to lost of visitors in a short time period, while the other is perfect for serving many pages to one visitor. So I went ahead and activated both of them at the same time

And whatdayaknow, there was no explosion 🙂

What happens at the moment is that generally, a page always has at least a few queries cached by DB Cache. You can even see the cached queries increasing with each time it’s reloaded (when bypassing hyper cache). This in turn allows a non-hypercached page to load quicker which is then saved into hyper cache for further visitors.

So currently you see the results of this experiment. I’d like to believe that my speed at the moment is quite good and others who have followed my advice have experienced similar improvements. I really hope this is the last time I have to play with caches in the future and that the current speeds are not just an illusion.

Let me know of the results if you try the same combo on your own sites.

Reblog this post [with Zemanta]

I feel exploited

The Division by Zer0 has been exploited with Spam Keyword injections. Aggravating! This post gives some more information on that.

Goddamnit! Someone, managed somehow to insert malicious php scripts into the site which were injecting invisible spam links to my content. Even more insidiously, those links were not injected to the html source of the page unless the browser user agent reported that it was a googlebot, making them all but impossible to see with a normal browser.

I was lucky to notice this because in the Google Webmaster tools I still had my site address added as www.dbzer0.com which was wrong as I’m not using the www. part anymore. Fortunately however, this allowed the site stats to show the keywords in the content instead of simply how people are linking to it, which made all the spam stand out.

Oh ouch!
WTF?

When I saw that my fist action was to do a search just to see if I was possibly looking at outdated data.  Unfortunately, the results were not uplifting.

Oh shi--
Oh shi--

This was not good. Looking at the cached copies of these pages, it was obvious that these links existed at least since the start of February which means that whatever is causing this, was added after my upgrade to WP2.7 or managed to remain active after it. The source code for the googlebot looked like this, when it should have been looking like this. The links were apparently pointing to redirection scripts in a cracked Movable Type based blog. I’ve fired an email to the author to advise him to take the site down but have heard nothing from him yet.

Take note people: If you’re not going to keep your site updated and patched, either take it down, or export it into pure html and let that stand. Don’t let your obsolete php and mysql setup running as that just invites people to turn your old site into a spam haven.

At this point I started looking around the interwebs in a bit of a panic as hate this kind of shit being associated with me. I couldn’t find anything exactly like what I had unfortunately. The only thing coming close that I found was this post which at least gave me some ideas on where to look.

I was able to discover 2 malicious php scripts residing in my wp-content folder. One was called cache.php and was on directy under /wp-content/ while the other was in the /wp-content/uploads and had a weirder name (can’t remember now). I summarily deleted them (although in retrospect I should have probably saved them for all of you to see) but I did notice the ironic comment inside, warning people not to copy them and pass them around.

I couldn’t find anything else after that but I was still not certain I was rid of the spam. A quick look through the google bot’s eyes showed me that the page didn’t return any spam results but that could also be because the script doing it is smart enough to recognise fake google agents. The only real way to find out if this still happens is to wait until Google indexes one of the spammed posts again and see if the spam links still appear.

As a precautionary measure, I also changed my WP password (as unlikely as it is that it would have been cracked through brute force) and looked around for anything that can help me discover such stuff in the future. I did find a plugin that looks very promising in this regard but unfortunately due to the way it asks for RAM and the setup of my host’s php, I can’t allocate enough memory for it to run. A last precaution was to add a search alert for these keywords appearing on my site which will, if I get cracked in the future again, give me notice within a few days.

On a more positive note, hopefully by removing these huge-ass scripts (many hundreds of line of code each) perhaps the load on my server will be reduced as well. But I’d be happy even if I simply see these keywords disappear from the Webmaster tools soon.

Reblog this post [with Zemanta]

Who knew WordPress excerpts were so useful?

Did you know about the amazing potential of Wordrpess excerpts? This is a short description and a link to an excellent article explaining their utility.

Excerpt from Meshari by Gjon Buzuku.
Image via Wikipedia

I’ve always wanted to put the excerpt field provided by wordpress to some good use but I never really realized what the best way to go about it would be and/or why I should spend the time writing an extra piece of information for the post.  Until now I’ve sometimes used them for replacing the frontpage snippet in case it broke due to not properly close html code and the like but nothing more than that.

In the end, the utility of the excerpts was so obvious that I had to slap my forehead for not thinking of it myself. Thankfully, someone else not only went to the trouble of explaining why excerpts were useful but also provided links and information for the tools you can use to utilize them best.

From: The manual Excerpt in WordPress. What, why, how, tips and plugins

WordPress excerpts, which are not excerpts, make a WordPress site easier to browse and its content easier to discover. In addition, when also used as META descriptions, good excerpts bring more and better traffic from search engines.

If you’re using wordpress, especially if it’s self-hosted, this is the kind of article you should be reading right now. The insights and improvement ideas would certainly make you rethink the way you utilize this underused feature and the concice and structured way this is presented makes the whole thing easy to go through and understand. As one commenter put it

Heard a cling and a thud ?
Well, it was my awesomeness-meter crashing !

What a post. Dugg deep, very deep into something that’s insanely powerful, but not appreciated, the WP Excerpts !

As for me, I’m already going through my latest posts and adding descriptive excerpts to all. I’m not going to go back to all 3 years of blogging (almost 4 now 🙂 ) but I plan to go through the last year at least.

Reblog this post [with Zemanta]

More copies of World of Goo sold when GNU/Linux version was released than any other day

The innovative physics game World of Goo was finally released for GNU/Linux and it managed to outsell the previous best selling day, via the developer’s website by 40%!

Fisty's Bog on World of Goo (Day 30)
Image by laurenipsum via Flickr

I just noticed a small update on the 2D Boy’s announcement of the GNU/Linux version for World of Goo.

Update 4: It’s only been 2 days since the release of the Linux version and it already accounts for 4.6% of the full downloads from our website.  Our thanks to everyone who’s playing the game on Linux and spreading the word.  Here are a couple of nifty stats:

  • About 12% of Linux downloads are of the .rpm package, 30% are of the .tar.gz package, and 57% are of the .deb package.
  • More copies of the game were sold via our website on the day the Linux version released than any other day.  This day beat the previous record by 40%. There is a market for Linux games after all 🙂

(Emphasis mine)

This is the kind of update that deserves its own blogpost just to make this heard. It is excellent news and I believe sends out quite a strong message to anyone who is paying attention.

As it’s difficult to repost the same URL to social news sites, I’m making this new post just to raise attention to this factoid.

I’m quite excited to see how much of the total pie the GNU/Linux versions will grab. We have already passed an amazing threshold where 1% of the OS market (or so we’re told) has managed to buy the game almost 5 times as much. Here’s to reaching 10% and beyond.

Reblog this post [with Zemanta]

Here's to reaching the "Games for Linux" tipping point

Why the Linux game market is underestimated and what we should do to change it. The recent World of Goo port to Linux is a perfect opportunity.

World of Goo: Fisty's Bog
Image by kartooner via Flickr

It’s been a classic argument in the GNU/Linux VS Windows debates that people don’t switch to the former because there are no games for it. And there are no games for GNU/Linux because developers don’t think there’s a market for it to justify the cost. And there’s no market to justify the cost because gamers don’t switch to it.

It’s a vicious cycle from which it’s extremely difficult to get out of. To do that, it would need one side to do the first step. Either gamers need to switch and start being vocal on wanting their games native for their OS (ie platform agnostic) or game developers need to show good faith and port or code their games for it from the get go and then see that the effort was worth it.

Well, To my delight, It seems that some developers did decide to attempt the later. The lately popular World of Goo has finally been ported to GNU/Linux. This is exciting news and the kind of thing that gamers on linux need to show support for if we want to provide incentive for this kind of thing to continue. The developers at the moment are curious about the results of this move and I’d like to think we won’t disappoint.

To tell the truth I haven’t played the game but I certainly have heard a lot about it. It seems to involve very innovative gameplay and I was tempted to purchase it through steam. One thing stopped me of course, which was the fact that I would have to boot my whole computer if I wanted to enjoy it.

This is, incidentally, something that happens quite often and affects my game purchase decisions. I’ve ended up only purchasing:

  • Games that are very cheap and I don’t feel like wasting a lot of money If I don’t play them until the next time I happen to boot into windows
  • Games that I really, really, really want to play. The ones that I’ve known for months that I would be playing when they came out. Needless to say those are few and far between.
  • Games that run natively on my OS of choice. It goes without saying that I do not get much of those but when I do, I don’t lose the chance to purchase them and thus have something to do play when bored without the annoying reboot. Case in point: I’ve already bough both the On the Rainslick Precipice of Darkness episodes and I will continue buying them in the future, because they are fun, cheap and most importantly, play natively.

The one thing that annoys me even more on this issue is how much resistance windows users display on this. It’s as if when game companies have a platform agnostic code then they are afraid that the performance on windows will drop. I honestly don’t know where this hostility comes from but it generally translates into mouthfuls of FUD and negativity on any kind of suggestion.

Incidentally very recently I had just such a discussion in a Demigod forum thread (one of the games that I really really want to play). The discussion started simply on the fact that Steam is and the Source engine are probably going to be ported to GNU/Linux and an appeal to Stardock ((One of the most progressive publishers and one that I believe can be more positive to this idea)) and Impulse to do the same. There were a lot of good suggestions and arguments on both sides and the very positive thing that Stardock devs actually took part and put forth their thoughts. For example:

As a part-time linux user myself, I’ve come to accept the fact that linux is not destined to be a gaming OS.  Until either developers abandon DirectX, or someone figures out a 100% painless DX port for linux, you won’t see a big move on linux games.  Why?  Because transitioning from a DX based engine to an OGL one is not in the least bit trivial.  iD can do it because I believe their games are done in OpenGL to begin with, so getting it to run on Linux is a much simpler task for them (by comparison).  UnrealEngine is built for both DX and OGL.

To get developers porting games to linux, there has to be a guarantee on the return on investment.  If it takes 1 full time developer a year to port some game, then that game has to at least sell enough copies to cover the cost.  To make it actually worth the time though it would have to make a lot more money than the cost to develop, otherwise it’s a better value to have that developer work on the Windows version which is a better financial bet.

The platform needs a few big-name champions to make it viable, but in a market where a big-name game can cost in the millions of dollars to develop, that’s a risk not many companies are generally willing to take.

In the end of course, Stardock wasn’t convinced. I was nevertheless surprised at the amount of negativity displayed by simple users, occasionaly without any obvious reasoning other than that they didn’t like GNU/Linux.

One of my main arguments in this thread was that the GNU/Linux gaming market is severely under-estimated at every turn. I truly believe that there are enough of us who not only are gamers but are willing to support those who extend a hand. And now is the time to put our money where our mouths are. Purchasing the World of Goo in non-trivial number will not only show its developers that it’s worth coding their future games for our OS as well, but it will certainly turn the heads of other publishers if they smell that there is a potential market once the WoG guys speak about the (hopefully positive) results.

To get Games for Linux (no TM yet) we need to reach a tipping point, either on the side of Gamers which will convince the Publishers that there is a market, or on the side of Publishers which will allow enough gamers to try the OS out without much gaming withdrawal. Lets hope that the results for the WoG experiment will be another small push towards that point.

Now go and read what Helios has to say about this. You also get a nice interview with the developers about the challenges they faced on the port (technical or not), as well as a little bonus offer 😉

Reblog this post [with Zemanta]

If someone fights unfairly and you nevertheless win, it doesn't mean they don't deserve condemnation

Techdirt believes that Mozilla has no basis to be siding with EU against Microsoft on browser anti-trust issues. I point out why this is the wrong way to see it.

Image representing Mozilla as depicted in Crun...
Image via CrunchBase

I have been a fan of Techdirt for a few years now but as Masnick becomes more and more rabidly pro-“Free” Market Capitalism,  I start to reconsider. I keep seeing articles which seem critical of one action only because it opposes the free market, not because of any utilitarian argument.

The latest post commenting on the recent siding of Mozilla with the EU anti-trust action against Microsoft is the latest such example of this trend. Within, the author complains that such a move is obviously wrong as well as misguided as obviously there isn’t a monopoly since Firefox has managed to gain market share. In the same breath however, he also mentions that the original instigator, Opera is an “also-ran”.

Basically what Masnick is saying is that if a complaint is made by someone who cannot gain any market share, it’s because they are not good enough. But if it’s made by someone who managed to gain a foothold, it’s disingenuous. Whatever happens, there can’t be a monopoly issue brought up at all.

Anyone can easily see the fallacious reasoning here. The truth of course is that Microsoft is not simply abusing its market position to stiffle innovation on the browser space ((mainly because it was in their best interest to have apps based on the OS or an OS-locked browser instead of a multiplatform browser)) but it has been doing so aggressively and for a very long and well documented time.

Firefox managed to achieve market acceptance despite Microsoft’s monopoly on the space. When the new browser came out, it didn’t even register on the radar until the first major grass root advertising and word-of-mouth campaigns started. Even though it was vastly superior to any of MS’ offerings, its growth was slow and tortured, owning mostly to the fact that most webpages were “optimized” for IE and flat-out refused to work with Mozilla based browsers.

Not only that but the fact that MS bundled IE with their OS ((After they hastily made it an “integral part” of the OS during the Netscape anti-trust case, in order to claim that they couldn’t remove it)) made any viable alternative difficult to discover. Why would most normal users even consider looking for an alternative browser which most of the time couldn’t access their banking portals? Many times. even when you put an alternative browser on one’s desktop and advised them to use it, they wouldn’t because it was not what they were used to. This is how deep the IE conditioning had gone.

There is no more striking example than what Techdirt dismisses quickly: Opera. Almost everyone will tell you that for a long time before even Firefox got conceived, Opera was the undeniable leader in features, standards-implementation, speed and basically all there was in a browser. And yet, it didn’t even make a dent in the market share of MS. Techdirt, the stalwart defender of innovation for some reason does not even wonder why Opera didn’t make it but rather assumes that it must have been because they were not good enough or something. In other words the classic  selective view of reality that annoys me so much about Free Marketeers.

Of course Firefox managed to compete, in the same way that GNU/Linux managed to compete, by being adopted immidiately by the Free Software movement who then went had to fight uphill for every percentile of market share. The reason they achieved it is because of their distributed nature, philosophical backing and knowledge of technology which allowed them to be unaffected or quickly overcome many of the hurdles in their way. Does that mean that the competition was fair? Not at all. It was stacked against them on every turn. But they persevered.

Opera unfortunately had neither a huge community behind them, nor the budget required to raise awareness of its existence which is why then, and still now, it still can’t get market share, even though it is still considered by many as one of the better browsers. However, were MS Windows to come bundled with Opera and IE and ask the user which one they wanted to use, then things would have been much much different. Most people who didn’t know either, would give a try to each and stick with Opera overwhelmingly.

The author also brings as examples of competition Google’s Chrome and Safari, both of which don’t sustain his argument in the slightest. The only reason either of those managed to achieve any market share is not because of any innovation but because of the popularity of their respective distributors. Apple has a well known fanatic fanbase and a considerable market share in the OS, for which they also bundled their own product. Google did a smart marketing campaign but overall Chrome, even though an inferior product from all others, gained share because it’s suggested in the front page of the most popular search engine.

And with all this, IE still stands at ~70% even though it’s the worse of them all and Microsoft has done practically no marketing whatsoever about it and only a half-arsed effort to improve their own offering (mainly by copying popular features). If that does not give you a very clear hint that something is amiss, then I do not know what will. Everyone must strive infinitely more to achieve even a single market share percentile while MS without doing anything can still enjoy a monopolistic percentage.

So yes, Firefox has managed to crack MS iron grip on the browser but that is not because a monopoly “obviously” doesn’t exist but rather despite this very clear, for all but the Free marketeers, monopoly. Just because they have managed to a degree to overcome the mountain of challenges posed by the anti-competitive business practices of MS does not mean that these practices should be left unpunished.

If you play a game and you opponent is obviously cheating but you nevertheless manage to defeat him by playing fair, does it mean that they do not deserve condemnation and punishment? Of course they do. You do not punish them only when you lose, you do it regardless – not out of spite or revenge – but as a lesson and a warning for the future. Leaving them unpunished simply gives the incentive to cheat the next time as well.

But the view of Techdirt is more inane than that. When you play with a cheater and you lose, you’re just a sore loser. If you win, then they couldn’t possibly have been cheating could they?

Reblog this post [with Zemanta]

This is why I love GNU/Linux

A short ICQ chatlog of my girlfriend having firefox problems and how easy it was to fix.

(7:16:50 PM) Viola: I have installed an update and now my firefox does not work anymore
(7:17:04 PM) Viola: chchchchilfä!
(7:17:07 PM) db0: what happens?
(7:17:13 PM) Viola: dead
(7:17:18 PM) Viola: It doesn’t talk to me
(7:17:38 PM) Viola: I can’t start it anymore
(7:17:55 PM) db0: ok, open a terminal and try the following
(7:18:02 PM) db0: sudo killall firefox
(7:18:21 PM) Viola: ok
(7:18:27 PM) Viola: un jetz?
(7:18:30 PM) db0: done?
(7:18:32 PM) Viola: jepp
(7:18:37 PM) db0: OK, try to open it again
(7:18:58 PM) Viola: aaaaaaah
(7:19:02 PM) Viola: schibby
(7:19:03 PM) Viola: danke
(7:19:06 PM) db0: 😉
(7:19:23 PM) db0: I love GNU/Linux 🙂
(7:19:31 PM) Viola: ich auch!

In windows I’d still be explaining how to open the task manager 🙂

Of WordPress Caches and Fast PHPs

More attempts to improve the performance of my Wordpress site through new Caching plugins (Hypercache and DB Cache) and Dreamhost’s FastCGI.

Example of a Plug-In Framework
Image via Wikipedia

Improving the speed of this and my two other sites has always been a major issue for me. Ever since I’ve switched to WordPress I’ve never been fully satisfied with the loading time and it seems I’ve been trying since forever to improve it.  My main methods were through the use of caching plugins such a WP-Cache and later on WP-Supercache and through manual performance tweaking. For a while it seemed to have worked to a degree until again my performance started dropping without any apparent reason.

It was at this point that I jumped to the VPS offering in a desperate attempt to get a site which loads in this century. Again, for a while things looked to be working well but now and then I would get horrible site b0rks which would take me hours to troubleshoot and resolve. The latest one was the reason I discovered that WP-Supercache didn’t play nice with VPS and thus I had to find something else, or live with it in a state of half-on.

To my delight, it seems that now there are new caching plugins available which I can try. I already mentioned Hyper Cache last time and today I discovered DB Cache (h/t  diTii.com) which seems particularly promising, especially because it works not by caching the fully loaded page, but rather by caching the Database queries themselves. This is an interesting take on caching since it now can improve performance for web crawlers as well as normal users. It also provides an extra benefit to me since I’m proving a gallery through the wordpress interface, and that means that the database queries for that are also cached.

So I ditched Super Cache from all my blogs and installed DB Cache on the Division by Zer0 and the Wesnoth Journals and Hyper Cache on the ACP. It’s of course always difficult to figure out how much difference a caching plugin has done to your site. As of now, I can’t say I notice a significant difference on loading times with DB Cache, however I did notice that the number of SQL queries that are made each time the page loads have dropped from >60 to about 15 which means that there some difference.

I  have also noticed anotther thing. In the past it could take a few seconds before my site even started loading (I guess while it was running the SQL queries) but after that it would be displayed very quickly (especially if it had been supercached) whereas now, the site starts loading very quickly but it takes more time to actually finish loading the content, in effect loading in parts (first the header, then the content etc) but in a way that is much more exaggerated than before.

Another thing I also decided to do is to finally activate Fast CGI for PHP. I hadn’t done this before as it wouldn’t have made much difference when Supercache was in use but now that the code is executed every time, it seems like a good idea. There’s also the added bonus that for VPS, the Xcache opcoder is available which further improves php performance when on high load. I do not think it will make much of a difference as my problem is not one of traffic but it may come in handy for those rare reddit moments.

As of now, the performance seems comparable to SuperCache times and I am hoping that this time I will not have any more random Internal Server Errors. Unfortunately my WordPress admin panel is still quite slower than I’d like with loading times randing frmo 5 to 15 seconds or more on occasion. I honestly don’t know what I can do to fix that but at least the admin panel is not something that is used very often.

Next step will be to see if Hyper Cache is better than DB Cache and if they can both play well together for a combined improvement.

So what do you think of the current speed?

Reblog this post [with Zemanta]

Is Dreamhost PS simply a way for Dreamhost to wash their hands of support?

I’ve moved the site to Dreamhost’s VPS offering but my support experience since has been less than optimal. Are we on our own?

Another month, another total crapdown of my sites which are hosted at the moment in Dreamhost’s Virtual Private Server offering. Once again the story begins in the usual way, all three of my  sites start puking Internal Server Errors all over the place which generally means that you are out of available RAM on your server. As I generally have about 180 Mb of availability, it would meant that either I have a huge amount of traffic that my Cache did not alleviate, or that something is going wrong on the server.

Going to the Resource Management, I am greeted by a classic figure

Up, up and away!
Up, up and away!

Having looked at my traffic already which had stayed steady in the last days, I know that this is certainly caused by some server/app malfunction. I know this from experience because the same goddamn problem happens to me so regularly, it’s not even funny anymore.

Since this happened while I was at work, I could troubleshoot it through the terminal as they have the ssh ports blocked so I had to wait until I came back home to investigate. Once I arrived, I fired up an ssh connection and checked what processes were running. As expected, it was PHP in CGI mode that was sucking my life’s blood.

Bad PHP. Baaaad!
Bad PHP. Baaaad!

Now mind you, I know all this because I’ve done it before where I had to google around and learn which commands to use to discover this info. The first time it happened, my ram usage was slowly creeping upwards in jumps of 30 Mb per week or so. After that, it simply happens all at once suddenly.

Now this is extremelly difficult to troubleshoot as you can have no idea what is causing this. A php5.cgi process can be anything under the sun that runs on PHP. Basically the whole wordpress interface or any of the dozens of plugins I have installed. You can kill the processes but this will not tell you what is happening and as it does not happen persistently, you can’t figure out which plugin might be causing it as shutting down a plugin does not stop the process and you don’t know when a process will get stuck again.

Unfortunately, and this is what is annoying me mostly, Dreamhost’s answer in the past has been that “It’s not our fault. Figure it out yourself”. A very unfulfilling answer as you might guess. But at least I know that I can expect very little help from them anymore so I avoid them.

So then I got to process killing. Unfortunately this time it seems that I had found a resistant strain of bug. As soon as I killed a process, 5 seconds later and a new one would be spawned, then another and another, until all my RAM was eaten up, no matter how much I increased my available. At this point I was fast reaching a deadend with my current skills as I couldn’t make the problem go away. I couldn’t even access my wordpress’ admin panel to disable plugins.

At this point, a former colleague suggested that this might be caused by a known PHP 5.2 bug which leaves processes hanging when done with them. I thought this might be a good thing to suggest to Dreamhost support to check so I fired up a support ticket.

A while later, I noticed that the RAM usage seemed to have dropped off so I thought that the problem had resolved itself. Unfortunately, while the main page was working the admin panel refused to work.

What admin panel. There's no such thing here
What admin panel. There's no such thing here

In desperation I did a quick server reboot and this was the point where the universe b0rked. After the reboot the whole site was off and my memory usage was stuck at around 20Mb which means that basically the whole thing failed to load. I fired a new ticket to support and waited.

I had to wait until today for an answer which basically told me that they managed to get the sites running again but advised me that my RAM usage was high so I should be checking that and no, they still can’t help me. Thanks Sherlock…

Looking around the interwebs however, I did stumble on a page in the dreamhost wiki where there was a note under supercache under caching that warned not to utilize the “super” part of WP Super Cache as it may drive resource use up on Private Servers. Gee, it would be nice if I knew of this a bit before. It would also be nice if Super Cache was not installed as part of the standard one-click installation of WordPress by Dreamhost which makes people assume that if anything, this plugin will be working well.

So I disabled Supercache on the Division by Zer0 and on the Wesnoth Journals and killed the remaining php processes. Lo and behold, no more processes were spawned. Unfortunately I was lucky that I could access the admin panel of these two sites after I increased my available resources to some ungawdly amount (1.5Gb of RAM or so). Unfortunately I was not so lucky in the Antichristian Phenomenon where not only I could not access the admin panel (never finished loading) anymore but the php processes kept spawning repeatedly and fast.

I tried deleting the plugin directory which led to my whole page being turned off. I tried fixing the .htaccess file. Nothing. Anything I tried, I couldn’t get the site to work properly. So I did the only thing I could do, renamed the whole wordpress directory and reinstalled again. At least this gave me an opportunity to finally rename the prefix of my database tables which helps avoid zero-day exploits by script kiddies. After a few hours, the site was back online.

Unfortunately the latest ordeal has really disillusioned me about Dreamhost’s PS and their support of those. From the 3 times I’ve contacted them about issues in randomly increasing resources, their reply has been “Deal with it yourself” because apparently now I control everything on the server and if anything goes wrong, it must be my own scripts or whatever. Seeing as I only use standard software like WordPress and Gallery this reply does not help me much.

Basically what seems to be happening is that when one decides to go to a PS in order to get a bit more speed (since shared hosting seems at time to be powered by hamsters) you’re on your own. If you’re not a (quite) techical user and have made the grave error of installing wordpress plugins on your site, you’re fucked. It seems that as far as Dreamhost is concerned, you shouldn’t be running plugins in the first place. Just vanilla WordPress for you.

Luckily for me, I know a few UNIX commands and how to use an ssh shell to do some troubleshooting. However even for me this kind of response is definitelly inferior. It would be nice if I could expect the Dreamhost support to ask questions like “Are you using WP Super Cache?”, or something similar. It would be nice to expect the support people to know of a few issues that generally might cause this kind of trouble. Is this is all too much to ask? Is it too much to ask to expect some attempt to help your users?

Last time I was delighted when the support tech gave me a simple command to help me trouble shoot but since then, all replies have been to explain me that it’s my own damn fault and this is very disheartening. To everyone considering the Private Server offering, if you’re not very technical and open to spending a few hours now and then to troubleshoot random issues that occur without you changing anything, then stay away from it and stick to simple shared hosting.

As for me, now my sites are all in the classic WP Cache mode and I’ve used Hyper Cache for the ACP to see how it goes. If all goes fine, I will switch everything to Hyper Cache and drop Super Cache altogether. ‘Till next time my site craps down…

Reblog this post [with Zemanta]