James Andres's Tips & How-To's

Welcome!

Friday, January 25, 2008
Hello Web-travlers and welcome to my new site. I’ll have some fresh content shortly, once I sand smooth all the rough edges on the site.

Until then, I’ve posted a few of the better posts from my blog on projectopus.com.

While you wait, why not check out the site in

/[e]?l(i|y)nks/
?

James.

Lesson learned: Apache2 MaxClients Variable

Thursday, November 30, 2006
This is an old post originally taken from my blog on Project Opus

Yea, I finally got around to reading about what the MaxClients variable in the apache2.conf is for. Please keep your laughter to yourself, but i thought what MaxClients meant was “how many clients can connect at one time.” So logically, I set it at 255. Well, I’m not sure if MaxClients is a cryptic name, or maybe I just missed the boat, but actually this variable controls how many server processes will run simultaneously!

Visually stated: MaxClients == MaximumNumberOfApacheInstancesRunningAtTheSameTime

So what? Well, when load got high, apache would start spawing “hefty” Drupal processes @ between 20MB and 80MB each.

Simple math: 255×60MB = 15,300 MB RAM usage (hint: we don’t have 15 GB of RAM)

As you can see this is a bad situation.

I changed the nubmer to 40 this morning and systems haven’t been happier :-)

Lessons learned … lessons learned

James.

PHP opcode caching and SMP (multiple processors)

Thursday, November 23, 2006
This is an old post originally taken from my blog on Project Opus

Hello all,

Off-Topic Note

I’ve decided to start blogging on a bit more of a regular basis. I’m not much of a blogger, but who knows … it might just stick this time. I have a hunch problem was subject matter. So from now on I plan to stick to what I know best. Geek stuff!

Main Feature

Just learned an interesting thing about APC (the popular PHP opcode cache) today: APC hates SMP. I’ve been trying for nearly a month to get APC to run stably on our multi-CPU system. Invariably the extension will start seg. faulting within a few minutes or hours of starting up.

After many headaches, I gave up on APC. Running PHP without an opcode cache is a fairly crazy thing to do, so for the last month I’ve been looking high and low for a replacement. Recently I just stumbled across XCache and immediately loved what I saw. XCache is very similar to APC, the installation was nearly identical, but it has a few added options (I haven’t explored them all yet).

Best of all, it works great with SMP!!!

XCache Introcution Page ... before then I had used APC. Although it was quite stable for a php4 with flock() configuration it had become unstable once I upgraded my server to a dual cpu (4 threaded cpu) because it flock()ed badly so XCache was used instead and seems to have solved the problem.

I couldn’t have said it better my self.

James.

Previous page
James-andres-165-bw James Andres

Country: Canada
About

Hello! Welcome to the current online home of James Andres, myself.

I'm a web developer, system administrator, and all-round geek.

This site is a journal of my life as it relates to techology.

Kudos and Link Bait

I work at Donat Group Enterprises building social networks, often with the Drupal CMS, of which I am a contributor. You may remember me from such sites as Project Opus.

Ross Howard-Jones is a brilliant designer who helped prettify this site. David Gratton inspired me to get off my ass and put this site together.

This site was built with the great language Ruby on the so-so platform Rails.