RE: [Zope-dev] Zope does dynamic, Linux kernel does static pages?
-----Original Message----- From: Ross J. Reedstrom [mailto:reedstrm@wallace.ece.rice.edu] Sent: Thursday, June 10, 1999 1:03 PM To: zope-dev@zope.org Subject: [Zope-dev] Zope does dynamic, Linux kernel does static pages?
Hey Zopesters - Just thought I'd point out something thart came up on the linux kernel mailing list this week. Apparently, as part of the aftermath of that whole Mindcraft 'benchmark' fiasco, it came to the kernel developers' attention that under NT, IIS has special status - it has some sneaky system calls that end up with the NT kernel effectively doing all the serving of static HTML pages. This had been discussed some time ago as an interesting idea under Linux, but this time around, someone started implementing it. It's still alpha, but it's at:
This being Linux, it's not specific to any one HTTP server, it'll cooperate with anything that listens on a port. Basically, it'll handle serving the simple static pages directly from the filesystem as fast as possible, and pass anything else on to the userland application.
Linus Torvalds himself seems to like the idea, and mentioned:
So you could even use a pretty much unmodified apache (or other) web server to do all the non-static cases - although it would probably imply that the user-level deamon would be better off being optimized for the "uncommon" case because it never sees the common case.
Hmm, a user-level deamon optimized for the "uncommon" non-static case: do I hear Zserver calling?
Admittedly, it's still alpha, but anyone playing with Zope2 on linux might want to look at this. To use it effectively, you'd need to use absolute URLS to static pages (and images) outside the zope ORB, so the module can find them.
In the long run, some sort of static 'shadow' directory structure, perhaps managed via one of the new ORB3 alternative storage managers, could allow the Zope developer to mark objects as 'static pages' that get pushed out to files, so the kernel daemon could see them. Hmm, this might even allow Zope's cache to become accessible to the kernel deamon? Does Zope do any caching of rendered of pages? If it did, That'd be a speed win for 'quasi-static' things that change slowly compared to typical user sessions. In fact, the caching would be a win no matter how you serve pages.
My random thoughts for today, Ross
This is cool, but I wonder about putting the whole serving logic in the kernel, it's obvious that the performance will increase, but I think there will be a comparable level of performance increase with the sendfile() call. sendfile() is a new call that is going to be in Linux 2.4. FreeBSD allready has it. sendfile is simply a system call that gets passed a file descriptor. All transmission of that file, from that point on, get's done by the kernel with only one buffer copy and no context switches between the kernel and the user process (instead of the usual logic of program->open call, (context switch), kernel->open file, (context switch), program->read file (buffer copy) program->write socket (buffer copy, context switch) kernel->send data, (context switch back to program) repeat). cdrom.com has a FreeBSD machine that they FTP serve with, they patched their FTP server to use sendfile and removed something like 20-30% of their FTP overhead. ZServer could get a request, check a cache, and then sendfile() cache hits, and pass cache misses onto Zope. Interesting link, BTW. -Michel
-- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://www.zope.org/mailman/listinfo/zope-dev
(For non-developer, user-level issues, use the companion list, zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
participants (1)
-
Michel Pelletier