Category Archive: General Info

Subcategories: No categories

General information, site information, etc.

Tech Blog 3.0 (aka “You win, PHP…”)

After a little over a year running on Tech Blog 2.0, you are now viewing version 3.0.  For this version, we’ve returned to WordPress from BlogEngine.  There are several issues that colluded to drive this change, most of which surrounded PHP and its crazy behavior.  (Geeky details follow – skip to the paragraph starting with “Bottom line:” if you don’t want the geek stuff.  I bolded it so it would be easy to spot.)

PHP’s recommended configuration is to run under Apache using the pre-fork multi-processing module (MPM).  The advantage to this is that Apache does not have to spin off another process to handle each request; it handles it in the same thread.  However, this means that each instance of the server must have all enabled modules loaded.  This means that each instance of the server (AKA “thread”) is very large, so the number of threads run is lower (typically 5-15 in a server the size we’re on).  Also, this means that each thread can only handle one request at a time; if you have 7 threads configured, each serving one of 7 requests, and an 8th request comes it, it has to wait for one to finish.  If the requests are served quickly, this may not be a problem; however, the avalanche of request that follow the typical front-page mention on mega-blogs can easily overwhelm it.

To fix this problem, there is another MPM, this one called worker.  In this scenario, there are spare thread waiting to fill requests, and these can spawn other threads to do further work if required.  So, the Apache threads would realize that a request needs to be handled by PHP, and pass it off to that process to be completed.  The Apache memory footprint is much smaller; it serves the images, scripts, and other static files, and passes off the requests that require heavy lifting.  PHP, then, has a (FastCGI) process where it receives these requests, processes them, and returns the response to the caller.  Because each of these threads only has to load the PHP requirements, they are smaller too, so you can have more threads processing at the same time; you just might survive that front-page mention!  (This is the same technique applied by LightTPD and Nginx, two other servers I tried at various times.)

It is in this scenario where PHP fails to live up to its expectations.  These PHP processes would simply stop responding, but the controller thinks they’re still there.  The end result to the user is a site that just sits and waits for output that will never come.  Eventually, they may receive a Gateway Timeout or Bad Gateway error.  The problem is worse on slower sites, but even popular sites seemed to fall victim to this from time to time.  This was also a problem whether PHP controlled its threads, or Apache controlled them.

The one thing that really perturbs me is instability.  If something is broken, I can fix it; if it works, I can fix it ’til it’s broke.   But something that works sometimes, and other times doesn’t, simply won’t fly.  I was able to introduce some stability by restarting the server 4 times a day, but that’s a band-aid, not a long term solution.  I was tired of fighting.

Bottom line: the configuration required for a stable server is in opposition to a lean-and-mean configuration.  So, I installed the required Apache modules, and will continue to run my PHP-serving server at a configuration twice as large as it needs to be.  I’ll eventually move the Mono (.NET) processes to another machine, where the fast configuration won’t stability problems.

But, PHP isn’t all.  While I would still heartily recommend BlogEngine.NET to someone who was going to serve the blog from a Windows machine, but I had some issues getting upgrades to go smoothly under Mono.  It also is optimized for fast serving, at the expense of RAM.  At this point, that’s not the tradeoff we need.

Finally, with this update, the blog has received its first new theme.  It’s a clean, clear theme that should serve the content well.  Plus, the social media icons up in the corner are just too cool, IMO.  I’ve also applied tags to all posts except the “My Linux Adventure” series, and this theme displays them.  (Comments are not here now, but will be migrated shortly.)

So, there you have it.  Enjoy!

Tagged , , , , , , , , ,

Tech Blog 2.0

After three years on WordPress, the DJS Consulting Tech Blog has moved to BlogEngine.NET.  There are several reasons for this change, some technical and some not.

  • PHP’s Fast CGI processor has a problem where, if all of the processes are busy, the server will simply time out.  While this hasn’t afflicted my server as much as others, it has caused problems; when this problem occurred, none of the PHP sites were accessible.
  • Through experience with a very heavily-used site, I became less enamored of WordPress’s “read from the database every time” way of doing business.  I also found that various caching plug-ins for WordPress, on this particular site, did very little to ease the load.
  • Since I first looked at Mono (Linux’s implementation of the .NET framework), it has matured significantly.  It supports most of C# 4.0 already, which was released earlier this year.
  • BlogEngine.NET is a rapidly-maturing blog platform, and the project has a stated goal of 100% compatibility with Mono.  This is good, because you can mention Mono problems to the team, and you’re not dismissed because you’re running Linux.

As part of the move, the URL has changed; the new link is http://techblog.djs-consulting.com .  I have implemented redirection for each post, the category and category feed links, and the main blog feed and home page from the old URL, so you may not have even realized that you’re looking at the new site.  The DJS Consulting Software Repository remains at http://djs-consulting.com/linux/software.

I’m looking forward to this new setup!

Tagged , , , , ,

The DJS Consulting Linux Software Repository

We have created a software repository, where users can browse files that may be available. The base location is http://djs-consulting.com/linux/software. Within there, there are a few areas.

  • /sled and /opensuse — These contain add-on CD images for SUSE Linux Enterprise Desktop (SLED) and openSUSE, created by Mike Petersen. These add-ons provide multimedia and gaming capabilities that don’t come with SLED unless you purchase the support or compile them yourselves. These images can be added as resources in YaST.
  • /xine — This contains the 64-bit RPMs for xine (the latest three), both xine-lib and xine-ui. New releases will continue to get their own posts, but that’s where they will be.

Enjoy!

Tagged , , , , , , ,

On Mission

Sorry for the lack of new content (although I did download and build the latest release of xine). I’ve been working on a community-based volunteer effort in Albuquerque, New Mexico called Not So Extreme Makeover: Community Edition. I’m handling the public website, as well as a private side that the leaders can use to track lots of different things. I’m going to have some good stuff I’ve discovered out here once we’re done (along with lots of praise to heap on PostgreSQL – I have a new “most favorite” open source database), but for the rest of March, I’ll likely be incommunicado.

Happy Easter – see you in April!

Tagged , ,

WordPress 2.3 About to Drop

Version 2.3 of WordPress, the blogging software I use to produce this blog (as well as the other blogs on my site), will be released later today. I’ll be upgrading these blogs on Monday evening. There have been major pieces of WordPress that have been re-worked, and those are causing some plug-ins to not work correctly. None of my blogs are all that reliant on plug-ins – the “Share This” plug-in is the main one, and it’s been verified in 2.3 already.

There’s lots more information on the WordPress Development Blog – I won’t go into the details here. I’m confident this will be a smooth upgrade. I just wanted to let you know in case some things look strange, I’m on it.

Tagged ,

Welcome!

Welcome to the DJS Consulting Tech Blog. This blog is a place where I plan to posts tips and other information regarding technology (AKA “geek stuff”). This will allow me to keep my personal blog non-technical.

I have imported my old “My Linux Adventure” posts from 2004 here, to allow the to be indexed and searchable.  I noticed, in the process, that some of the information is somewhat dated – take it for what it’s worth, which is twice what you paid for it!

I hope that the information here will be beneficial to you.

Tagged ,

Linux Play on Pause

With my inability to get my network working, I have resigned myself to running WXP.  Work is starting to get really busy, and my personal life is as well.  Maybe at some point in the future I can fire things back up and play some more.