Category Archives: Uncategorized

Apache Update

Thanks everyone for the helpful comments yesterday on Apache vs. lighttpd. I’ve taken the first few steps towards improving things. I’ve eliminated mod_php5, switched all PHP to FastCGI, and switched from the prefork to the event MPM.

The event MPM docs say that it’s incompatible with mod_ssl, but it worked, and googling for that turned up mailing list posts from 2006 saying it was fixed.

The only real glitch was that egroupware inexplicably depends on libapache2-mod-php5. It works fine without it, but I had to create a fakelibapache2-mod-php5 that provides libapache2-mod-php5 to convince the system not to remove egroupware when I switched to the event MPM.

I went from 28 Apache processes to 4 Apache processes plus an average of around 2 php5-cgi processes — which, despite the name, actually do grok FastCGI. Three of my Apache processes now have an RSS of about 20M, and the other of about 30M. The php5-cgi processes are at around 40M. My old Apache processes ranged from 18M to over 40M. So there is some memory savings here, though not drastic.

My Redmine processes, two of them, each use over 50M. Ruby on Rails still is leaving me with a bad taste. At least it’s not a Java app; it seems a lot of those allocate 2GB before they ever start accepting connections.

I’ll see how this goes for awhile, but for now I doubt that moving to lighttpd (or similar) will yield enough benefit to make it worth the effort. But there may be some benefit in inserting a caching proxy in front of Apache, so I may yet do that.

Apache vs. lighttpd

I’ve had a somewhat recurring problem that Apache on my server is a memory hog. The machine has a full GB of RAM now, but even so, heavy activity from spidering bots or reddit can bring it to its knees.

I’ve been trying to figure out what to do about it. I run Apache on there, and here’s an idea of what it hosts:

  • This blog, and two others like it, using WordPress
  • Several sites that are nothing but static files
  • gitweb
  • A redmine (ruby on rails) site
  • Several sites running MoinMoin
  • A set of tens of thousands of redirects from mailing list archives I used to host over to gmane (this had negligible impact on resource use when I added it)
  • A few other smaller PHP apps

Due to PHP limitations, it will only work with the Apache prefork or itk MPMs. That constrains the entire rest of the system to those particular MPMs. Other than PHP, most of the rest of these sites are running using FastCGI — that includes redmine and MoinMoin, although gitweb is a plain cgi. Many of these sites, such as this blog, have changed underlying software over the years, and I use mod_rewrite to issue permanent redirects from old URLs to their corresponding new ones as much as possible.

I do have two IPs allocated to the server, and so I can run multiple webservers if desired.

lighttpd is a lightweight webserver. I’ve browsed their documentation some, and I’m having a lot of trouble figuring out whether it would help me any. The way I see it, I have four options:

  1. Keep everything as it is now
  2. Stick with Apache, discard mod_php and use FastCGI for PHP, and pick some better MPM (whatever that might be)
  3. Keep Apache for PHP and move the rest to lighttpd
  4. Move everything to lighttpd, with FastCGI for PHP

I know Apache pretty well, and lighttpd not at all, so if all else is equal, I’d want to stick with Apache. But I’m certainly not above trying something else.

One other wrinkle is that right now everything runs as www-data — PHP, MoinMoin, static sites, everything. That makes me nervous, and I’d like to run some sites under different users for security. I’m not sure if Apache or lighttpd is better for that.

If anybody has thoughts, I’m all ears.

Ahh, updates…

It’s been awhile since I’ve made a blog post, and it will probably soon be evident why.

For myself, I am taking two college classes — philosophy and gerontology — this semester, and still working full time. That’s busy right there. I’m really enjoying them, and in particular enjoying the philosophy class. I will, at long last, graduate this December.

Oliver is about 3 months old now. He’s starting to smile at us more, make his cute little baby noises more, and is very interested in taking in all of his surroundings. He has his opinions about things, but isn’t expressing them too loudly just yet.

Jacob, on the other hand, is sometimes.

Our person from Parents As Teachers was talking to him for his 3-year-old evaluation. She said, “Jacob, are you a boy or a girl?” “I a kitty.” “Are you a boy kitty or a girl kitty?” “I just a PLAIN kitty. Meow.”

He seems to delight in catching someone saying or doing something in a manner he considers wrong. “No, not like THAT!” is heard a lot in our house these days. Or perhaps, “No, not RAILROAD tracks. They TRAIN tracks, dad!”

Jacob’s imagination is very active. Sometimes if it is time to go use the potty, he will insist that we all stop because a freight train is going through the kitchen, the crossing guard lights are flashing, so we have to STOP. He pretends to be kitties, runaway bunnies (he has a book called Runaway Bunny), and occasionally other things.

Town Hall Questions

Sen. Brownback (R-KS) will be at my employer Monday, and will have a short town hall session. I’m debating whether to go or not, and whether to say anything or not. I don’t agree with him on much, and highly doubt that I’d change his mind on anything. Should I go? If so, what should I say?

Here are some random facts I’m considering mentioning:

  • When Jacob was born 3 years ago, it cost us $250. When Oliver was born this summer, it cost us around $3000, and Oliver wasn’t a more complicated pregnancy.
  • Most of the past 8 years, my insurance premiums have gone up and my benefits have gone down.
  • If I lost my coverage, I couldn’t afford to buy it on my own, even if I still had my job. Insuring our family on the individual market would cost more each month than our mortgage.
  • Almost as much (80%) of my paycheck goes to health care as to federal taxes. I’d gladly take a tax increase if it slowed growth in health care costs.
  • Brownback says it’s too expensive to to comprehensive reform right now. The estimated cost of reform is $900 billion over 10 years, and it will be paid for.
  • Brownback voted for the Bush tax cuts, which cost $2.5 trillion over 10 years, yes to attack Iraq ($700 billion so far), yes on Medicare prescription drug coverage ($400 billion). He didn’t vote for a way to pay for any of these.

Suggestions?

One final note: I will not be doing anything disruptive or disrespectful.

Late Summer

It’s that time of the year again. Everything is changing, and maybe for the better.

The days are getting shorter. When I left for work on my bicycle yesterday morning, it was still dark outside, and a little nippy. There’s nothing quite like riding a bicycle down a deserted country road at night, a cool breeze at your back, and having the sun come up as you ride.

And with the cooler weather, we can open our windows at night instead of running the air conditioner. It’s also nice to have a pleasant cool breeze flowing through the house, and hear the frogs, crickets, owls, coyotes, and other wildlife at night. Out here, we certainly don’t hear sounds of traffic, or loud car radios, though on a really clear night we might hear the rumble and whistle of a train from a few miles away.

This is also sunflower season in Kansas. The wild sunflowers, when their smaller-than-most-people-think flowers, grow everywhere. Some ditches turn into a sea of person-height yellow. Sunflowers are on the sides of bridges, around people’s mailboxes — just about anywhere that isn’t mowed or farmed. Then you also pass the sunflower fields, with their larger flowers, even more sea-like.

The beans are getting tall in the fields this time of year, and it won’t be long before the milo starts to turn its deep, dark reddish brown.

But, you know, we’re Kansans. We can’t really let ourselves enjoy it all that much. Just today, I heard a conversation — apparently the Farmer’s Almanac is predicting a brutally frigid winter this year. Gotta keep our sense of pessimism about weather alive now…

Google Groups Fail

Last month, I wrote that I was looking for mailing list hosting. It looks like some of the lists I host will move to Alioth, and some to Google Groups.

Google Groups has a nice newbie-friendly interface with the ability to read a group as a forum or as a mailing list. Also, they don’t have criteria about the subject matter of a group, so the Linux user’s group list I host could be there but not at Alioth.

So I set up a Google Group for the LUG. I grabbed the subscriber list from Ecartis, and went to “Directly Add” the members. This was roughly August 12.

After doing so, I got a message saying that Google needs to review these requests to make sure they’re legit, and will get back to me in 1-2 days. OK, that’s reasonable.

Problem is, nobody appears to be reviewing them. This is three weeks later and no action.

So I decided I would ask someone at Google about it. The only way they give to do that is to post in the Google Groups Help Forum. So I did. Guess what? They ignore that, too.

Let me say: relying on this sort of service for something important really makes me think twice. It makes me nervous about using Google Voice (what if my Google Voice number goes down?) It certainly makes me think twice about ever relying on Gmail or the other Apps for anything important.

My own mail server may not have the features that theirs does, but if it breaks, I don’t have to worry about whether anybody even cares to fix it.

Looking for a Linux-compatible scanner

I own two scanners: a Fujitsu ScanSnap S510 and an Epson Perfection 4180 Photo. The S510 is a sheetfed document scanner, and works great at that. It has perfect SANE support, duplex mode, excellent sheet feeder, and is a generally good document scanner. It’s passable for photos, but only that. The color isn’t great, and the precision of a sheetfed scanner just isn’t up to a flatbed.

The Epson has never been supported by SANE directly. There was an epkowa driver, but the 4180 epkowa driver hasn’t been updated in ages and isn’t compatible with any modern Linux distro.

So, I’m looking for a flatbed scanner for photos and documents (no need for negatives; that’s the THIRD scanner on my desk.) The most important requirement is that it work well with Linux. The next most important requirement is that it have as good scanning quality as possible for an under-$200 scanner.

If it’s an all-in-one (with a printer), I’m fine with that, as long as it meets the above requirements. Any suggestions?

Preschool Update

Tuesday was open house at the preschool Jacob will start attending when he turns 3. It’s the same preschool I went to, and the only one in the small town closest to us. It’s been owned and operated by the same person for all of the 30 years it’s existed.

We got out of the car when we got there, and Jacob went it full explore mode. He walked a few feet, and happily said “Ooo! There a ditch here! It has water sometimes.” We went inside, and he looked around for about 5 seconds, then was off. It didn’t take him long to find the toy train, the bulldozer, and the school’s bird. He was so busy, in fact, that he didn’t even notice the snacks that were set out until I pointed them out to him.

It’s hard to describe the building. You walk in and you immediately understand that the owner knows a lot about kids, and providing them a creative, interesting, and educational environment. In one corner, there’s a record player that’s probably older than the preschool, and a CD player right above it. Then there’s a little reading nook with some books, headphones, and cassette player. I’m sure Jacob will enjoy learning about cassettes and records, which we don’t really have out at home anymore.

The owner’s husband built most of the furniture for the preschool himself 30 years ago. He figured it would last maybe 10 years, but is still holding up well and gets a new coat of paint every few years. So Jacob will be sitting on the same chairs I used to sit on.

Most importantly, there is no TV to be seen anywhere in the preschool. No computer in there, either. But there is a large outdoor playground — the fun type that I used to enjoy as a child, not the boring plastic type that I see so much these days.

It reminds me a lot of Mr. Rogers. There isn’t expensive technology or a fancy building, but good old-fashioned creative play. Just what children need. I’ll be very happy that Jacob will be there, and I think he will be too.

Prebuilt PC suggestions?

My MythTV box died today, and I think I would like to buy a new workstation for myself, and cascade my old workstation to the MythTV.

Trouble is, I don’t have time to spec out components and build it myself this time. I haven’t bought a prebuilt PC for myself since 6 years ago, and don’t really know what’s good.

My general requirements are: works with Linux, has a flexible BIOS (many of the low-end home PCs have a limited BIOS with few options), is a quiet and energy-efficient as possible, quad-core, 2GB or more RAM, SATA. Nice to have would be fanless nVidia video, but I could also take one with cheap onboard video and move an existing PCIe card to it.

Suggestions?

Best Free Software project hosting?

I’m getting tired of running software.complete.org myself. Redmine eats up CPU like crazy when web bots hit it, despite me preparing the most restrictive robots.txt I’m comfortable with. So I’m looking at other options.

Some features I want (though not really showstoppers if missing) are the ability to close bug tickets via changelog messages, ability to script the uploading of new tarballs, and quick and easy operation.

SourceForge

Immediate fail. It feels like some seedy alley these days. Ads all over, terribly cluttered, and slow. No thanks.

Google Code

Initially it looks great. A couple of things bother me: one, they have a lifetime limit on 25 different projects. I have more than that in my git repos already.

They don’t directly support git right now, which is fine (I like using my own git server anyhow). But even for the VCS they do support, there isn’t a way to close a ticket without having to go to the website.

Savannah

Looks like an interesting option. Still the lack of support for closing tickets from the changeset. I hope that the service will stay around indefinitely, but not a big deal to me if it doesn’t.

Alioth

Similar to Savannah, I guess. Not sure what the pros or cons would be either way.

Overall

I haven’t been able to verify whether any of these will let me script the uploading of tarballs. In general, I write a lot of little programs and a few big ones, so lightweight tools that let me track open bugs in all my tools are preferred.