Category: Geek Things

Best Tech Support Ever

· by Mr. Me · Geek Things · 2 comments

I was told that today not once, but TWICE.

I host my various web sites on a Virtual Private Server.  Since I never come close to using the bandwidth allotted to me every month (No, dear Internets.  That is NOT a challenge.), I host sites for a couple of friends as well.

This afternoon, I helped one of my friends work out a problem that was occurring on her site, and she said it was the best tech support ever.

I suppose it helps that I actually care that things go well for her site because, she's a friend.  It probably also helps that I understand the frustration that goes along with bad tech support.  It helps that I'm in the same time zone (well, within an hour, depending on Daylight Saving Time) and I'm not working off of a tech support script.  Oh, and I also enjoy reading her blogs, so if they have problems, I might end up missing out!

So hooray!  Today, I'm proud to provide the best tech support ever!

New Toy

· by Mr. Me · Geek Things, General

I'm posting this from my new iPad. So far, I really REALLY like it. It's an incredibly fun new toy. I don't know that it would ever replace a laptop for me, but WOW! It's a solid little device for a first generation thing.

Go get one yourself:

Zagg iPad Giveaway

New Favorite Number

· by Mr. Me · Geek Things · 5 comments

I have a new favorite number.  It's a little more complicated than "lucky 7" or "3 is a magic number."

My new favorite number is:

999999999999999999999949999999999999999999999

I know it looks cool, just sitting there all by itself.  That many nines all put together like that makes the number look really really big.

The 4 is smack dab in the middle.  That means that this number is a numeric palindrome.  It has the same sequence of digits if you look at it left-to-right or right-to-left.  That makes this number even cooler.

But coolest of all?  This is also a prime number.  It's only evenly divisible by itself and 1.

Now THAT is a cool number.  Yes, it's definitely my very favorite 45-digit prime number.

New Theme

· by Mr. Me · Geek Things · 2 comments

I found a new WordPress theme and I really quite like it.  I hope that you do too.

As a matter of fact, I found a hundred free themes.   You might like some of them.  If you're looking for a good WordPress theme, this site is worth a click!

SPAM

· by Mr. Me · Geek Things

What am I dealing with?

Well, there's egg and bacon; egg sausage and bacon; egg and spam; egg bacon and spam; egg bacon sausage and spam; spam bacon sausage and spam; spam egg spam spam bacon and spam; spam sausage spam spam bacon spam tomato and spam;

Yes, the spambots are getting feisty these days.

...or Lobster Thermidor a Crevette with a mornay sauce served in a Provencale manner with shallots and aubergines garnished with truffle pate, brandy and with a fried egg on top and spam.

It's getting ridiculous. About half the mail I get right now is telling me that I have comments to moderate.

Could you do the egg bacon spam and sausage without the spam then?

Urgghh!

What do you mean 'Urgghh'? I don't like spam!

Fortunately, most of it is still caught by Akismet, but REALLY. It's driving me just a little bit crazy.

Sshh, dear, don't cause a fuss. I'll have your spam. I love it. I'm having spam spam spam spam spam spam spam beaked beans spam spam spam and spam!

Baked beans are off.

Yes, the only thing spam was EVER good for was a Monty Python skit.

iPod Woes

· by Mr. Me · Family, Geek Things · 1 comment

Last night, I finally had some time to help my younger son with his iPod. He wanted to put some more movies on it. I didn't think that would be such a big deal.

When we connected his iPod to iTunes, it told us that there was a software update available. We decided to update his iPod software from 1.0.3 to 1.1. No big deal.

My son watched patiently as the update downloaded (we have a pretty darned slow DSL connection here) and it said that it was installing.

That's when his iPod died.

DEAD. Bricked. No response to anything. We tried the 5 r's on Apple's support site. It didn't respond AT ALL. Nothing.

The poor boy was in tears. I could only hug him and wipe away the tears and tell him that he did NOTHING wrong.

After he went to bed, I Googled and searched around on Apple's support site and put in a trouble ticket and almost made an appointment at the Genius Bar at the Gatweay. I fiddled and tried to reset it over and over and over. I got nothing but a small flash of something on the screen, then more blackness. I played with it until almost 1:00 in the morning. I woke up the next morning fretting about it and feeling terrible for him.

This afternoon, I looked a little closer at some discussion threads on Apple's support forums. It turns out that others were having the same problem directly after updating to version 1.1. Some of these "bricked" iPods actually seemed to "reset" themselves when left alone and unplugged. They finally ran completely out of battery and went through a cold boot process which woke them up again.

I put the "dead" iPod to my ear and heard a high-pitched sound coming from it. It was apparently still "on," just completely unresponsive. I told my son what I had read and we decided to just let it sit for 24 hours and see if it would come back.

A few minutes after he went to bed, he came running downstairs to tell me that his iPod had suddenly lit up in the blackness of his bedroom! We went up and got it and it was telling us to connect it to a power supply. After we connected it, the much-hoped-for Apple logo appeared, the update status bar came up, we watched the update happen, and his iPod came back from the brink. It's working perfectly again. My son is, understandably, having a hard time getting back to sleep because he's so excited and happy.

Lessons learned:

  1. Sometimes, patience pays off.
  2. Sometimes, it sucks to be a kid and feel things so deeply.
  3. Sometimes, it's awesome to be a kid and feel things so deeply.
  4. Sometimes, I wish I could be a kid again.

My job explained (again)

· by Mr. Me · Geek Things

Douglas Adams understands Software Engineering.  In a quote in this post he explained software engineering pretty well.

But here's another quote that explains software engineers pretty well:

I am rarely happier than when spending entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand. -- Douglas Adams

Yep.  He knows.

Oooooo! Pretty!

· by Mr. Me · Geek Things · 1 comment

I'm writing this post from a new computer at work.

One of the things I work on is a Software Development Kit for Linux, UNIX and Mac. From that and the title, you can probably guess that the new computer is a Mac. It's an iMac to be specific.

I've always been of the opinion that Mac computers are good for something. They make great doorstops. The last Apple computer that I used was probably the Apple ][e that my dad bought when I was in Junior High. So to say that I've honestly given them a chance wouldn't be stretching the truth. It would be an outright lie.

But lately, Apple as done a couple of things that have piqued my interest:

1) They put Intel processors in them. Whether or not that is a GOOD thing is a religious issue. But I'm more familiar with Intel processors, so it's something that is a little more familiar to me.
2) They released OS X. For most people, it's just a pretty new front end, but for people like me that are doing development on Mac and that are used to doing development on other operating systems, this is huge. The non-pretty back end behind the scenes is a variation of UNIX developed by Berkeley Systems. So if I can do development on any UNIX or Linux system, the process is very similar, if not often identical, in OS X.

The bottom line: I believe that this shiny new iMac on my desk is 85% eye candy and 15% computer. But that's a 14.997% increase over the previous iMacs, as far as I'm concerned.

It's REALLY gone!

· by Mr. Me · Geek Things

The lag is really gone.

REALLY.

The site has been up and running without a reboot for more than a week now.  Swap in/swap out statistics look perfect:  0 and 0 respectively.

*whew!*

LagBeGone

· by Mr. Me · Geek Things · 1 comment

The settings I tweaked for the database server? They were only part of the problem. They were just the beginning.

My VPS has only 128 megabytes of dedicated memory. No, that's not a lot of memory, but for a simple web server, it's sufficient. At least, it's sufficient IF some settings are right.

Unless you want to learn WAY more than you ever wanted to about memory management on Linux systems, you'd probably better stop reading now. This is going to get WAY beyond geeky here.

No. Seriously. If you're not interested in minute technical details, you'd better stop reading or your head just might explode.

One of the nice things about a Virtual Private Server that you don't get with most shared hosts is a command prompt with root access. With this type of command prompt, you have the ability to troubleshoot things like memory issues.

The first thing that I checked was /var/log/messages. I found regular messages in this log that said things like:

Out of memory: Killed process 7716 (mysqld)

Out of memory: Killed process 7725 (httpd)

This made it pretty clear that it really WAS a memory issue and that the programs suffering most from lack of memory were my database server (MySql) and my web server (Apache). Since these two things are, to say the least, critical for web sites (they're the core of most web sites, especially sites with blogs), I needed to figure out how to keep these servers from being killed. These servers were asking for more memory than existed, so they were being stopped by the machine.

My next step was to look at the memory usage on the machine. I saw that the total memory available was barely higher than the amount of memory in use. That worried me at first until I did some research and found that this situation is very normal with Linux systems that have limited memory. The next thing I looked at was the memory buffers used. This shows how much memory is actually being used by applications. The absolute maximum amount of memory available is the amount of physical memory plus the amount of "swap space" (which I'll explain in a moment). The disturbing thing about the memory buffers was that it appeared dangerously close to the absolute maximum amount of memory available.

So... How to fix this? I needed to find out which applications were hogging memory and I needed to figure out how to make them stop being such bloated pigs.

I found out that there is a way to display what percentage of total memory was used by each process. From that, I found out that the worst offender was the Apache Web Server and another big problem child was Spam Assassin. Apache will create multiple servers (to serve up multiple simultaneous requests), each of which can consume 15% of the server's memory. Apache alone was eating up about 60% of the memory available and Spam Assassin had multiple copies running, each of which was using about 7% of the memory. Add to that a MySql database server that was using about 15% of the available memory, and guess what. I was OUT of memory.

So what does the system do when it runs out of memory? It uses swap space.

Swap space is simply disk space that is used as memory by the system. When running a program a computer will first check and see if the needed part of the program is already in memory. If it is, it will use the program in memory. If not, it then checks to see if it's in the "swap space" on disk. If it's there, it has to copy it from the disk to memory. If there's not enough free memory to copy it into memory, it first has to copy something from memory into the swap space. Thus, it swaps different applications back and forth between system memory and disk. Why is this a problem? Memory access = usually very very fast. Disk access = usually very, very, very slow in comparison. Access to memory is measured in nanoseconds, or BILLIONTHS of seconds. Access to disk is measured in milliseconds, or THOUSANDTHS of seconds. So realistically, memory access is a million times faster. If memory could run the hundred yard dash in 10 seconds, a disk could run it in just under 116 days.

The other problem is that the swapping of memory blocks from memory to disk takes time and processing power. So as more swapping takes place, the entire system slows down.

So I checked to find out how much swapping was taking place.

The Swap In and Swap Out numbers were in the mid-hundreds. This meant that my server was doing way way WAY too much swapping. Good numbers would be close to zero. The less swapping, the more that memory is being accessed instead of disks and the faster the system will run.

So I needed to find out how to make the memory-hogging programs not hog as much memory. A little research later and I found out that I needed to:

  1. Limit the amount of memory that MySQL was using by adding 3 or 4 lines to a configuration file.
  2. Limit the number of web servers by changing about 3 lines in a configuration file.
  3. Limit the number of spam assassin servers by changing a line in a couple of configuration files.

So by making a few small changes, I could solve this problem. I made the changes and the results are great! Apache is using about half of the memory it used to. Spam assassin is using less than a third of the memory it used to. MySql is using less than half of the memory it used to. These three changes dropped my swap in/swap out numbers from the mid hundreds each to 1 and 2 (at this moment) respectively.

The bottom line: You probably didn't have to wait forever to read this long, way-too-technical, very boring post. I learned a lot. I'll be able to fix problems like this in the future. And I didn't have to pay more to add memory to my server. All of those things are GOOD things!