5 posts by 2 authors in: Forums > Off Topic / Other
Last Post: July 12, 2002   (RSS)

By chris nz - July 10, 2002

Hi all,

I am posting this here because I'm not sure where else it would be appropriate (we are using AM).

We run Mac OSX 10.1.5 (current version) with Tenon Intersystems' iTools 6.5.4 which is a tweaked Apache server. I have now played with the settings for some time and found out that the Squid Cache basically disables the serving of our main html pages for some reason that I can't quite figure out yet.

My question is, does anyone know if object caching is having a real impact on the performance of the cgi?

Also, (since I am still finding my bearings on 'Unix' on the Mac) what would be the best tools to test the performance of our configurations we have setup for Article Manager running on our MacOSX based Unix/Apache server?

Thanks in advance for any helpful replies:)

Re: [chris nz] cgi performance (off topic?)

By Dave - July 11, 2002

Hi Chris,

I actually have a lcd imac running OS X 10.1.5 sitting right beside me here on my desk (I'm writing this on Windows XP though).

You said that your Cache server disables the serving of your main html pages? How does it disable them? Are people unable to view them or specifically happens when people try to access them? Does it disable all pages or just some pages?

Next, "Object caching", I'm not really sure what you mean here in regards to CGI? Are you thinking of some feature specific to Squid Cache, or something to do with mod_perl perhaps? I don't know if it relates to CGI at all, but if you can give me some more details I'll look into it for you.

As far as load testing goes, many of the common unix/apache tools you might find should apply just as well to Apache on OS X with Article Manager as they would to Apache on another unix. There's a number of articles on the web on tuning your Apache setup to maximize speed. Since Article Manager publishes content as HTML pages your Apache server will be able to serve them just as fast as any other static web pages you have on your server (which is typically really really fast) and cgi process overhead won't even be an issue.

A quick search on google suggests that this is a popular (free) load testing tool for Apache:
http://freshmeat.net/projects/apachejmeter/?topic_id=836

Let me know some more details and I'll see if I can come up with some more answers for you. : )

Dave
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] cgi performance (off topic?)

By chris nz - July 11, 2002 - edited: July 11, 2002

Hi Dave,

Basically, if I turn the 'Accelerator Cache' (that's the Squid Cache) ON in iTools' server settings, browsers don't actually see our static web address and come up with an error 'Not found'. The Squid Cache is ON by default, and I have tested this problem after a reformat of drive and clean install of OSX and iTools with nothing else running at the time.

I have sent off an email and spoken to Tenon some time ago when we first bought iTools, but their answer was to simply turn the cache off...:( not exactly what I call a helpful answer at the time...) DNS is not the problem. It's purely my difficulty to understand why iTools settings are doing just that. My solution is, take a few days out in the near future and seriouly play with Apache as it ships with OSX, and finally delve deep into UNIX. But really not your problem..:)

What I was really asking is, how much of an impact the Squid Cache feature has on any of AM's operation, and you clarified that here. (Thanks)

The one other thing I don't quite get though is the following:

iTools has fastcgi module loaded, and installs by default a fastcgi directory (by default has only root access to it though) and a cgi directory.

I have tried both cgi directories to see which one is actually working and/or faster. I set the privileges as per your install instructions, but also had to change the permissions on the cgi directories to get AM going.

When I had AM installed in the fastcgi directory, I had to turn ON the Squid Cache to get AM working. I'm not sure if that makes sense to you, but it didn't to me. So I currently run AM in the ('standard') cgi-bin directory. And it works fine!

I just can't quite determine if the fastcgi-handler or if cgi-handler is actually handling AM requests on the server. But again, that's not really your problem, it's a question of my knowledge not being deep enough to know exactly everything about Apache and iTools implementation of it.

The question from you regarding 'Object caching' probably relates to my ambigous descriptions of iTools settings. In iTools' settings windows, the Squid Cache setting is also called 'Object Cache' in one of their windows. mod-perl is certainly running, and the only question to that is, does mod_perl under Apache (on MacOSX) have any special settings that impact on AM's performance?

Sorry if this is a bit of an off topic ramble, move or delete it. if you like. When we have a really clear understanding of everthing relating to Apache on OSX and running AM, or any of your products, we will be happy to become a reference site for you!

Re: [chris nz] cgi performance (off topic?)

By Dave - July 12, 2002

Ok, I understand.

Fastcgi (using the mod_fastcgi apache module) and mod_perl are both ways of speeding up perl processes on web servers. They typically do this by caching a compiled version of the script in memory and a running the script in the same process space as the web server (more or less).

Both systems require that programmers take specific steps to have their programs work properly. In theory, well written applications shouldn't require much modification, in practice there tends to be a number of subtle issues that can come up.

We don't officially support either system right now because they're non standard setups (in that most people use plain old CGI) but we do intend to support mod_perl moving forward. In fact, we've written Article Manager and all our recent software with this in mind. One of the issues is determining what version of mod_perl to support. The most commonly installed version is seldom the version most servers tend to run so we typically have to test on multiple versions. If enough people are interested in fastcgi, we'll take a look at that as well.

What I recommend (and what I do myself) is that, unless you have a compelling reason to do otherwise, you start with the most basic settings, with all the turbocharging turned off. Your mac with Apache will been able to handle a good amount of traffic even without any extra bells and whistles. Then, when you have time, try and get the Squid Cache working for some regular html files. When you get that up and running and/or you want to give fastcgi a try, try it on some simple scripts first. For example, here's a hello world script:

#!/usr/bin/perl
# hello.cgi - test script

print "Content-type: text/html\n\n";
print "Hello world!";

That way you'll know it's not anything in ArtMan that may be conflicting with fastcgi. Plus, this always makes conversations with support people easier since they can't really point to the program as being a potential source of the problem. Note, if you have fastcgi AND mod_perl running, there could be some conflicts there...

PS: I'll move this to general since it's probably of interests to other people besides just artman users.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] cgi performance (off topic?)

By chris nz - July 12, 2002

Thanks Dave,

That's the best explanation and help I had in a long time!! And having read your post, I think that the fastcgi AND mod_perl enabled may well have been what caused my problems. If I get clear confirmation of that issue on my MAc, I'll post results.

Cheers