Archive for June, 2010

Road Trip: Lansing to Richmond, KY and back.

June 15, 2010 in life,Road Trips | Comments (0)

I’m typically not very quiet about my love for road trips (or about anything else, really).  I adore the ability to get in my car and drive to an undisclosed (or unknown) destination just for the hell of it.

I have a flickr set devoted just to pictures I’ve taken while driving around.

Yesterday, I took a day trip to Richmond, KY.  We left promptly at 6am, and got to the Richmond area around noon exactly, around an hour ahead of schedule (what? *innocent look*), so we got off the freeway an exit early and drove over a much smaller bridge than the one that the freeway has.

Clay’s Ferry Bridge is a bridge that replaced an old style ferry that used to be used to take cars (and people and carriages and anything else you can imagine) across the river. These days, it looks like this:

Clay's Ferry Bridge

Clay's Ferry Bridge

We crossed over from the left of the picture to the right, and proceeded up the hill. About half way up, there was a turn off that looked like it had been torn up a bit, and there were two crosses there. We pulled over to look. The one was far older than the other, but this one was so new it struck me and I took a picture.

Grave, by Clay's Ferry

Grave, by Clay's Ferry

This was an absolutely gorgeous spot. The entire state is so beautiful, in a slightly different way from Michigan, and I love to visit it.

After we’d had our fill (as if that were possible) we continued on the way, and arrived at Aunty’s house, loaded up the car with tons of fabric, had some lunch at Ramsey’s in Lexington with The Aunty Betty, and the Cousin Kelsey.  Ramsey’s signature dish is called a ‘Hot Brown’, and looks like a heart attack on a plate:

Lunch

Lunch

The Cousin is pregnant and was due yesterday so we went walking for a bit in the Mall attempting to make baby Clarissa come on out.  We headed back to Lansing around 5, arriving back in town around 11.

The drives down and back were uneventful (except when I misread the highway sign on the way back, and got off on an exit in Dayton…) and it was slightly emotionally straining, but overall it was a good day.

I plan to make more trips like that. I miss the road.


Work, life, balance.

June 14, 2010 in life,work | Comments (1)

Ask anyone who works with me, or is friends with me, and they’ll tell you:I struggle to find a balance between my work life, and my outside-of-work life. I am, by genetics and life-long-training, a workaholic. My bosses have always been able to count on me to get the job done, no matter what, and my family and friends have heard “I can’t tonight, I have to work,” more times than I feel comfortable admitting.

For the last year or so, I’ve been trying to spent more of my time doing things that I love that *aren’t* work, and I’ve been doing pretty well with it. The weekends are spent doing things I enjoy, and only sunday nights have been work time, really. I’ve taken more road trips, spent more time with my Mom, and The Kings, and I really truly feel more complete for it.

There are some pretty big things that upset this balance:

1) I overcommit. It’s not so bad anymore, since I’ve figured out that saying no isn’t bad, but I still do it. I automatically plan for 50 hours a week to be work, and sometimes promise 70 hours of work. Whoops.

2) People quit. It happens, people move on, but the people that have been in the company long enough to have a relatively complete picture are fewer and far between. Too, when they leave, the workload has to be shuffled around until it settles again. I’m called on to fill a lot of different roles, and I love that I get to do so many different things, but it’s definitely a challenge.

3) I like my social life. A lot. I hang out with some of the single most awesome people on the planet.

4) I make no effort to separate the two. If someone from work calls with a question or an emergency, I will generally drop what I’m doing and help them. Likewise in my friends and family. Too, I hang out with people I work with all the time, and like to include my other friends in the same circle.

This comes up now because I am experiencing some discomfort these days, and I can’t seem to identify it. I’ve eliminated physical problems as much as possible (bloodwork!), and have (both) spent weeks drinking, and weeks not drinking. I’m even (slowly) allowing myself to develop some feelings someone I’m sleeping with for the first time in 2+ years.

The discomfort manifests in odd ways. A strong defiance to clocking more than 10 hours of overtime, even if I do other work from home. An urge to travel more. Less explosive reactions to the things that upset me at work, and increased compassion for almost everyone on the planet.

All the while, though, there’s something fussing me, and it’s growing stronger. It’s quickly becoming an urge to hide. Or to run. I can’t tell which. But if I don’t figure it out this year there may be an explosion.

Anyway, this is pretty raw brain dump and rambling. And, now that I think of it, completely out of place for this blog. It’s been a long time since I put this much of my brain’s ramblings on the internet.


The guys make me proud.

June 8, 2010 in life,work | Comments (0)

For the second year in a row Liquid Web submitted two chilis for the Lansing Board of Water and Light sponsored Chili Cookoff. This year, placed in b oth categories that we entered.

Chris and Jerry, with their awards.

Chris and Jerry, with their awards.

That’s bloody RIGHT. We do hosting AND chili.  You can see the rest of the set at flickr.

:D


Apache Configuration and Performance Tweaks [part 2]

June 7, 2010 in tech,work | Comments (0)

Tags:

Note: This is part 2 in a series on Apache in a LAMP environment. You can read part 1 here.

Now that we’ve covered the common directives, and how they relate to each other, let’s talk about some tweaks to make Apache hum in your environment. We will assume that you know where to find the referenced files.

What we’ll cover in this post is all contained here (a copy of my own VPS’s Apache directives).


KeepAlive On
MaxKeepAliveRequests 150
KeepAliveTimeout 5
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 20
MaxClients 150
MaxRequestsPerChild 500
</IfModule>
<IfModule worker.c>
ServerLimit 5
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 500

Timeout 300

Understanding the implications of any changes you make to your configuration is essential, but a lot of that knowledge will come with experience. Here is my take on three of the directives, and some of the things you can do with them.

1: MaxClients.

This directive defines how many simultaneous and independent requests will be served by Apache. There are two things to consider before you change this setting.

  • What is the current setting?
  • By default Apache uses a setting of 150. This is a good starting point but it’s probably low for dedicated servers. Slowly ncrease it in increments of 25-50. If it’s already at 500 or 1000 then increasing it more may not be the right answer.

  • How much memory/CPU does your site take per page load? How much memory/CPU do you have left?
  • You want to allow pages to be served. You don’t want to crash the server. If your site is normally memory or CPU intensive and you don’t have much to spare you will want to think carefully before increasing it.

If MaxClients is reached new requests are queued rather than being served immediately. This will appear to clients like a really long load time. Check your error log for this error:

[Sun Jun 06 18:00:15 2010] [error] server reached MaxClients setting, consider raising the MaxClients setting

There are a couple ways to handle this. The most obvious is increasing that number. You can also use a command like netstat to determine if there is a single IP address that has a lot of connections to port 80 on your server. My favorite piece of bash-fu:

netstat -tn 2>/dev/null | grep :80 | awk '{print $5}' | cut -f1 -d: | sort | uniq -c | sort -rn | head

That will collect a list of all of the open connections to port 80 and sorts the 5th field in that string. Depending on your system you might need to tweak the line to sort by the correct field. The ‘Foreign Address’ field is the one you want.

Netstat

nestat -lnp | head

2. KeepAlive

KeepAlive is an on/off setting. It determines if a connection to the client will remain open after Apache serves its request. If your server is high traffic or is serving a lot of small and/or flat files then turning KeepAlive off can significantly reduce resource use by Apache.

Beware, though, that changing this directive is not as predictable as with the others. If you decide to change it on an a server that is experiencing problems at the time you should keep a close eye on your server’s load and your finger on the kill -9 trigger.

3: MaxRequestsPerChild

MaxRequestsPerChild defines how many requests a single Apache child would serve before it was killed and a new child spawned. In a shared environment this can be very helpful to negate the effects of memory leaks in the web server. By default this setting is 1000. A good value for this setting in a shared environment is 150% of your MaxClients directive.

If you are serving the same static, predictable content you can safely pump this directive up pretty high. This will decrease the amount of times that Apache has to kill and spawn new children. 10,000 is a good setting for higher traffic servers with stable/static content. If you like to live dangerously you can set it to ’0′ (unlimited). If you increase it beyond 150% you might consider writing a script that will monitor your server’s memory use and alert you if it gets too high.


Apache configurations are very subjective. Once you understand each directive you’ll find that you develop your own best practices. Since most configuration tweaks are born out of necessity you will probably find yourself making these changes under fire. Good luck. :)