Hmm--I'm not sure what you're thinking of or referring to, but the
common "optimization" is to use sendfile(2), which seems to be
alive and well in the 2.6 tree.

Whoops, you're right, I just remembered a sysadmin email about sendfile not existing on the kernel we're using. Hmm...

Sendfile requires that the data to be written come from a file
descriptor. The assumption is that the program opens a file, then wants to pass it off to have it sent out another file descriptor, typically a
network connection.  But, what if you want to avoid disk I/O and cache
that data in memory?  sendfile() isn't necessarily workable, there.

Perhaps you could mmap() to a fd and use that--should test the
performance of such an implementation.

I've done exactly that in the past, and found virtually no speed improvement, because Unix has a very aggressive disk cache, so adding your own cache on top of that just skips a few system calls.

So, I don't see any point in worrying about improving aolserver's
plain-file-sending, at least until we get start getting 10 gigabit
network cards (!)

I am concerned about your "hello world" dynamic request benchmark,
though.  I would have expected at least 4k req/sec--not the sub-1k
req/sec you saw.  I have a feeling it has to do with the default
ns_pools/ns_limits settings, which naturally are NOT tuned for a 8- core
CPU box.

I bet with just a few minutes of tweaking and tuning, we can get between
4k-8k simple dynamic req/sec out of your hardware.

I have an 8 cpu Mac I, but it's not on the net (it's at my home), so I can't give you ssh access. If you can suggest a thing or two to try, I'll give it a whirl.

I benchmarked the "/helloworld" C module, and got about 16k responses per second vs 900/s with the tcl equivalent.

I've been looking at C-caching of Tcl dynamic content, with "dirty cache" support. For example, replacing the Tcl code that returns a user's uploaded photo with C code.

I wrote C code to do this, and got 14k/second vs 240/s for the same tcl function. So, C really is a good replacement for Tcl when a particular URL needs to be very fast.

-john


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to