From alex.kiernan at thus.net Thu Apr 15 08:39:21 2004 From: alex.kiernan at thus.net (Alex Kiernan) Date: 15 Apr 2004 09:39:21 +0100 Subject: Patches for x86-64 Message-ID: <72k70h63eu.fsf@alexk.eng.demon.net> I don't know if these are strictly correct (x86-64 kernel hacking is new territory for me), but they seem to work. I was actually working with the tux patch in the current FC-devel RPM, rather than the unbundled patch, but since this is all base kernel support, I expect that its the same for both. diff -ur kernel-2.6.5.redhat/linux-2.6.5/arch/x86_64/kernel/x8664_ksyms.c kernel-2.6.5/linux-2.6.5/arch/x86_64/kernel/x8664_ksyms.c --- kernel-2.6.5.redhat/linux-2.6.5/arch/x86_64/kernel/x8664_ksyms.c 2004-04-11 18:53:12.000000000 +0100 +++ kernel-2.6.5/linux-2.6.5/arch/x86_64/kernel/x8664_ksyms.c 2004-04-13 04:51:20.506994864 +0100 @@ -30,6 +30,7 @@ #include #include #include +#define __KERNEL_SYSCALLS__ #include #include #include @@ -226,3 +227,8 @@ EXPORT_SYMBOL(memcpy_toio); EXPORT_SYMBOL(memcpy_fromio); + +EXPORT_SYMBOL(execve); +EXPORT_SYMBOL(sys_write); +EXPORT_SYMBOL(sys_chroot); +EXPORT_SYMBOL(sys_chdir); diff -ur kernel-2.6.5.redhat/linux-2.6.5/include/asm-x86_64/unistd.h kernel-2.6.5/linux-2.6.5/include/asm-x86_64/unistd.h --- kernel-2.6.5.redhat/linux-2.6.5/include/asm-x86_64/unistd.h 2004-04-04 04:37:36.000000000 +0100 +++ kernel-2.6.5/linux-2.6.5/include/asm-x86_64/unistd.h 2004-04-12 16:13:34.000000000 +0100 @@ -424,7 +424,13 @@ __SYSCALL(__NR_afs_syscall, sys_ni_syscall) #define __NR_tuxcall 184 /* reserved for tux */ +#ifdef CONFIG_TUX +__SYSCALL(__NR_tuxcall, __sys_tux) +#elif defined(CONFIG_TUX_MODULE) +__SYSCALL(__NR_tuxcall, sys_tux) +#else __SYSCALL(__NR_tuxcall, sys_ni_syscall) +#endif #define __NR_security 185 __SYSCALL(__NR_security, sys_ni_syscall) @@ -542,6 +548,7 @@ #define __syscall_clobber "r11","rcx","memory" +#ifndef __KERNEL_SYSCALLS_NO_ERRNO__ #define __syscall_return(type, res) \ do { \ if ((unsigned long)(res) >= (unsigned long)(-127)) { \ @@ -550,6 +557,9 @@ } \ return (type) (res); \ } while (0) +#else +# define __syscall_return(type, res) return (type) (res) +#endif #ifndef __KERNEL_SYSCALLS__ @@ -696,6 +706,16 @@ return sys_wait4(pid, wait_stat, flags, NULL); } +static inline long chroot(const char *filename) +{ + return sys_chroot(filename); +} + +static inline long chdir(const char *filename) +{ + return sys_chdir(filename); +} + extern long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long off); -- Alex Kiernan, Principal Engineer, Development, THUS plc From wms at igoweb.org Sat Apr 17 07:50:05 2004 From: wms at igoweb.org (William M. Shubert) Date: Sat, 17 Apr 2004 00:50:05 -0700 Subject: Running Tux with no secondary server? Message-ID: <1082188204.11419.75.camel@desktop.igoweb.org> I was considering Tux for a server of mine, but the configuration I was planning isn't one of the two recommended in the docs, so I thought I'd check here and make sure it wouldn't cause errors. Basically, I want to run Tux with no secondary server. Any requests that Tux can't answer should get a static error page. My reason is that the server is very busy with a large application. It has a large number of files (over a million) which it needs to touch often, and which get downloaded to web clients fairly often as well. Right now it runs Apache, which takes up a decent chunk of memory that I'd rather use for the "main" application. Tux seems to use a lot less memory - especially on a per connection basis. Since I have no dynamic content at all coming off of this system, is this possible with Tux? I see tux has a /proc entry for the port of the secondary web server, should I do anything special there to tell tux "don't bother," or would it be OK to just leave that value at some port that nobody is listening on? Thanks. If Tux can't do this I guess I'll look into other web servers that are lighter than apache, but seems that Tux is the lightest of them all, and comes on RHEL by default, so it would be my first choice. Bill Shubert (wms at igoweb.org) From mingo at elte.hu Sun Apr 18 13:37:31 2004 From: mingo at elte.hu (Ingo Molnar) Date: Sun, 18 Apr 2004 15:37:31 +0200 Subject: Running Tux with no secondary server? In-Reply-To: <1082188204.11419.75.camel@desktop.igoweb.org> References: <1082188204.11419.75.camel@desktop.igoweb.org> Message-ID: <20040418133731.GA21945@elte.hu> * William M. Shubert wrote: > Since I have no dynamic content at all coming off of this system, is > this possible with Tux? I see tux has a /proc entry for the port of > the secondary web server, should I do anything special there to tell > tux "don't bother," or would it be OK to just leave that value at some > port that nobody is listening on? if the secondary server does not exist then Tux will generate a simple error reply if it encounters a request that it cannot handle. I.e. it should work just fine with static content. Ingo From diogenes at vgernet.net Sun Apr 18 15:01:49 2004 From: diogenes at vgernet.net (Ralph E. Kenyon, Jr.) Date: Sun, 18 Apr 2004 11:01:49 -0400 Subject: Running Tux with no secondary server? In-Reply-To: <20040418133731.GA21945@elte.hu> References: <1082188204.11419.75.camel@desktop.igoweb.org> <20040418133731.GA21945@elte.hu> Message-ID: On Sun, 18 Apr 2004 15:37:31 +0200, Ingo Molnar wrote: > > * William M. Shubert wrote: > >> Since I have no dynamic content at all coming off of this system, is >> this possible with Tux? I see tux has a /proc entry for the port of >> the secondary web server, should I do anything special there to tell >> tux "don't bother," or would it be OK to just leave that value at some >> port that nobody is listening on? > > if the secondary server does not exist then Tux will generate a simple > error reply if it encounters a request that it cannot handle. I.e. it > should work just fine with static content. > > Ingo I'm a relative newbie for linux, but... When I was testing and debugging my server setup on Redhat 9, I turned off the apache secondary server. service httpd stop Somewhere there is a configuation that will say don't start the httpd on bootup. You'll need to find and configure that too. This will leave tux running by itself. The Tux configuration file specifies which files to pass to the secondary server. This is the TUX/redirect line in file etc/tux.mime.types (on my Redhat 9 system). You will need to comment those all out. Tux should also be configured to watch port 80 (the default in Redhat 9). I'm assuming it should not be much different on other than Redhat systems. Hope this helps. -- Ralph E. Kenyon, Jr. http://www.xenodochy.org/ralph.html 191 White Oaks Road Williamstown, MA 01267-2259 Phone: 413-458-3597 Home pages: http://www.xenodochy.org http://www.ballroomdances.org ------------------------------------------------------- FIGHT SPAM http://www.xenodochy.org/diogenes/antispam.html (If you are thinking about collecting my email address, read the above page first!) -------------------------------------------------------- Keep our semantic environments and cyberspace clean. Always report errors discovered while surfing the web. ------------------------------------------------------ My favorite saying (from general semantics): It's not that seeing is believing, believing is seeing, and we're much better at believing than we are at seeing. From mingo at elte.hu Mon Apr 19 07:07:56 2004 From: mingo at elte.hu (Ingo Molnar) Date: Mon, 19 Apr 2004 09:07:56 +0200 Subject: [patch] tux3-2.6.5-A3 Message-ID: <20040419070756.GA15513@elte.hu> the latest Tux patch merged to 2.6.5 is available at: redhat.com/~mingo/TUX-patches/tux3-2.6.5-A3 this patch also includes the x86-64 fixes from Alex Kiernan. Ingo From mingo at elte.hu Mon Apr 19 08:27:55 2004 From: mingo at elte.hu (Ingo Molnar) Date: Mon, 19 Apr 2004 10:27:55 +0200 Subject: [patch] tux3-2.6.5-A3 In-Reply-To: <20040419070756.GA15513@elte.hu> References: <20040419070756.GA15513@elte.hu> Message-ID: <20040419082755.GA19545@elte.hu> > redhat.com/~mingo/TUX-patches/tux3-2.6.5-A3 > > this patch also includes the x86-64 fixes from Alex Kiernan. it also has an UML compilation fix from Sapan Bhatia. Ingo From max at expires-2004.workforce.de Mon Apr 19 14:45:41 2004 From: max at expires-2004.workforce.de (Max Helmet) Date: Mon, 19 Apr 2004 16:45:41 +0200 Subject: AW: Running Tux with no secondary server? In-Reply-To: <1082188204.11419.75.camel@desktop.igoweb.org> Message-ID: > Basically, I want to run Tux with no secondary server. Any requests that > Tux can't answer should get a static error page. > Right now it runs Apache, which takes up a decent chunk of memory that > I'd rather use for the "main" application. Tux seems to use a lot less > memory - especially on a per connection basis. If scalability and memory usage are your key requirements, you should have a look at http://www.fefe.de/fnord/ as well. Regards Max From thierry at mailhub.co.za Wed Apr 21 14:28:12 2004 From: thierry at mailhub.co.za (Thierry de Montaudry) Date: Wed, 21 Apr 2004 16:28:12 +0200 (CES) Subject: the questionmark problem Message-ID: <407CD36D011E4C8C@mail04.pds.libertysurf.fr> (added by postmaster@libertysurf.fr) Hi, Sorry if it is the wrong place to ask... but I couldn't find the answer anywhere: I am trying to migrate a server from RH7.1 (tux 2.0.26) to RH9 (tux 2.2.9), and can't make it work the same way. All the URL are like http://server/img/file.gif?l=x&s=y (only serving images) With the current server (RH7.1), tux handles all URLs even if there is a '?' in the URL, but I can't manage to make tux 2.2.9 do the same, and it clearly says in the (short) doc that if the URL contains a '?' it will be passed to the secondary server... Is there any way to get tux to handle URLs with a '?' without recompiling the kernel? If not, where can I find docs about creating a tux kernel module to do the job ? (and change the links to be http://server/img?file.gif&l=x&s=y) or at least to get the headers and one sample? Some would say I could change my links... but the logs are processed to create stats, so I have to include some info in the link. Thanks and regards, Thierry From mingo at elte.hu Wed Apr 21 15:44:19 2004 From: mingo at elte.hu (Ingo Molnar) Date: Wed, 21 Apr 2004 17:44:19 +0200 Subject: the questionmark problem In-Reply-To: <407CD36D011E4C8C@mail04.pds.libertysurf.fr> References: <407CD36D011E4C8C@mail04.pds.libertysurf.fr> Message-ID: <20040421154419.GA4559@elte.hu> * Thierry de Montaudry wrote: > Is there any way to get tux to handle URLs with a '?' without > recompiling the kernel? have you tried "net.tux.ignore_query = 1" in /etc/sysctl.conf? Ingo From thierry at mailhub.co.za Wed Apr 21 16:03:41 2004 From: thierry at mailhub.co.za (Thierry de Montaudry) Date: Wed, 21 Apr 2004 18:03:41 +0200 (CES) Subject: the questionmark problem In-Reply-To: <20040421154419.GA4559@elte.hu> Message-ID: <4083C040005BD6A2@mail07.pds.libertysurf.fr> (added by postmaster@libertysurf.fr) Tried it in sysctl.tux... got: error: 'net.tux.ignore_query' is an unknown key Is there a place where I could get some docs about creating a kernel module for tux? Thanks, Thierry On Wed, 21 Apr 2004 17:44:19 +0200, Ingo Molnar wrote: > >* Thierry de Montaudry wrote: > >> Is there any way to get tux to handle URLs with a '?' without >> recompiling the kernel? > >have you tried "net.tux.ignore_query = 1" in /etc/sysctl.conf? > > Ingo From mingo at elte.hu Wed Apr 21 17:31:06 2004 From: mingo at elte.hu (Ingo Molnar) Date: Wed, 21 Apr 2004 19:31:06 +0200 Subject: the questionmark problem In-Reply-To: <4083C040005BD6A2@mail07.pds.libertysurf.fr> References: <20040421154419.GA4559@elte.hu> <4083C040005BD6A2@mail07.pds.libertysurf.fr> Message-ID: <20040421173106.GA7975@elte.hu> * Thierry de Montaudry wrote: > Tried it in sysctl.tux... got: > error: 'net.tux.ignore_query' is an unknown key do you have the /proc/sys/net/tux/ignore_query switch? You should have it with the latest versions of Tux. Ingo From anton at samba.org Thu Apr 22 16:19:48 2004 From: anton at samba.org (Anton Blanchard) Date: Fri, 23 Apr 2004 02:19:48 +1000 Subject: [patch] tux3-2.6.5-A3 In-Reply-To: <20040419070756.GA15513@elte.hu> References: <20040419070756.GA15513@elte.hu> Message-ID: <20040422161948.GG22027@krispykreme> > > the latest Tux patch merged to 2.6.5 is available at: > > redhat.com/~mingo/TUX-patches/tux3-2.6.5-A3 > > this patch also includes the x86-64 fixes from Alex Kiernan. I removed almost all of the in kernel syscalls on ppc64 and it broke tux. I think we can use syscalls.h now and call them directly. I also have a fix for a compile error with tux not compiled as a module. Its a quick fix im not sure how you want to solve it. Anton --- foobar2-anton/net/socket.c | 2 +- foobar2-anton/net/tux/extcgi.c | 5 +++-- foobar2-anton/net/tux/main.c | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff -puN net/tux/main.c~fix_tux net/tux/main.c --- foobar2/net/tux/main.c~fix_tux 2004-04-22 23:59:44.579665398 +1000 +++ foobar2-anton/net/tux/main.c 2004-04-23 00:01:29.694430863 +1000 @@ -10,6 +10,7 @@ #define __KERNEL_SYSCALLS_NO_ERRNO__ #include +#include /**************************************************************** * This program is free software; you can redistribute it and/or modify @@ -192,9 +193,9 @@ int tux_chroot (char *dir) set_fs(KERNEL_DS); cap_raise (current->cap_effective, CAP_SYS_CHROOT); - err = chroot(dir); + err = sys_chroot(dir); if (!err) - chdir("/"); + sys_chdir("/"); current->cap_effective = saved_cap; set_fs(oldmm); diff -puN net/tux/extcgi.c~fix_tux net/tux/extcgi.c --- foobar2/net/tux/extcgi.c~fix_tux 2004-04-23 00:03:12.352990742 +1000 +++ foobar2-anton/net/tux/extcgi.c 2004-04-23 00:03:26.183040711 +1000 @@ -10,6 +10,7 @@ #define __KERNEL_SYSCALLS_NO_ERRNO__ #include +#include #include "parser.h" /**************************************************************** @@ -87,7 +88,7 @@ repeat: repeat_read: Dprintk("reading %d bytes via read().\n", left); oldmm = get_fs(); set_fs(KERNEL_DS); - len = read(2, tmp, left); + len = sys_read(2, tmp, left); set_fs(oldmm); Dprintk("got %d bytes from read() (total: %d).\n", len, total); if (len > 0) @@ -275,7 +276,7 @@ static int exec_external_cgi (void *data Dprintk("POST data to CGI:\n"); oldmm = get_fs(); set_fs(KERNEL_DS); - ret = write(1, req->post_data_str, req->post_data_len); + ret = sys_write(1, req->post_data_str, req->post_data_len); set_fs(oldmm); Dprintk("write() returned: %d.\n", ret); if (ret != req->post_data_len) diff -puN net/socket.c~fix_tux net/socket.c --- foobar2/net/socket.c~fix_tux 2004-04-23 00:04:21.116141895 +1000 +++ foobar2-anton/net/socket.c 2004-04-23 00:06:23.963199811 +1000 @@ -1985,11 +1985,11 @@ void __init sock_init(void) int tux_Dprintk; int tux_TDprintk; +struct module *tux_module = NULL; #ifdef CONFIG_TUX_MODULE asmlinkage long (*sys_tux_ptr) (unsigned int action, user_req_t *u_info) = NULL; -struct module *tux_module = NULL; spinlock_t tux_module_lock = SPIN_LOCK_UNLOCKED; asmlinkage long sys_tux (unsigned int action, user_req_t *u_info) _ From williama_lovaton at coomeva.com.co Fri Apr 23 16:54:14 2004 From: williama_lovaton at coomeva.com.co (William Lovaton) Date: 23 Apr 2004 11:54:14 -0500 Subject: sufficiently-capable networking cards Message-ID: <1082739254.12689.39.camel@localhost.localdomain> Hi there, This is my first post to the list. I have been using tux 2.2 with RedHat 9 in the production web server of my company with excellent results. We are serving a large enterprise web application to several users (550 concurrent) all over the country (Colombia). We are using Apache/PHP/Oracle in combination with tux in a somewhat modest hardware: Compaq SMP 4x PIII 550MHz, 2GB RAM. (Right now we need more CPU power) I'm willing to make the move to Fedora Core 2 as soon as possible to get the benefits from the new 2.6 kernel. Looking the documentation in tux 3.2.18 it says: "Given sufficiently-capable networking cards, it enables direct scatter-gather DMA and hardware-based TCP/IP checksumming from the page cache directly to the network, avoiding extra data copies." Can any body post a list of "sufficiently-capable" network cards?? Currently, I'm using this one: Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] I'd like to update the NICs to newer/better hardware. What NIC model would you suggest me?? specially one that uses a feature complete kernel driver and it is actively maintained. Besides this, I'd like to know what models of Gigabit Ethernet NICs are well supported in the kernel. We are planning to enhance the network connection between the web server and the database server. BTW, What are the major new features and improvements in tux 3.2 over 2.2?? Besides the 64-bit kernel and a 32-bit userland support mentioned in the NEWS file, I suspect there are more good surprises in there. Thanx in advance, -William From mcd at daviesinc.com Sat Apr 24 04:50:04 2004 From: mcd at daviesinc.com (Chris Davies) Date: Sat, 24 Apr 2004 00:50:04 -0400 Subject: CGI & Tux Message-ID: <1082782204.25302.1257.camel@mcdlp.pbi.daviesinc.com> I'm missing something basic, I know it. I've documented the options that appear to be relevent, and can post whatever other config information might be needed. Kernel 2.6.6-rc2-mm1-tux3 and 2.4.26-ow1-tux3 tux 3.2.16 userspace DOCUMENTROOT=/var/www CGIROOT=/ (for testing, I'll chroot it properly once I get it working) set in sysctl.tux, verified net/tux/virtual_server = 1 net/tux/cgi_gid = 33 net/tux/cgi_uid = 33 /etc/tux.mime.types TUX/CGI cgi pl Have also tried, just cgi, just pl /var/www/test.com does exist, owned by www-data.www-data (just in case) drwxr-xr-x 3 www-data www-data 116 Apr 23 22:30 test.com -rwxr-xr-x 1 www-data www-data 424776 Apr 24 00:12 a.cgi -rwxr-xr-x 1 www-data www-data 73 Apr 23 22:30 j.pl -rwxr-xr-x 1 www-data www-data 68 Apr 23 21:45 test.cgi gcc -o a.cgi -static a.c (just to ensure no dependencies) /var/www/test.com# ./a.cgi Content-type: text/html C Program mcd at mcdlp:~$ telnet 192.168.24.102 80 Trying 192.168.24.102... Connected to 192.168.24.102. Escape character is '^]'. GET /a.cgi HTTP/1.1 Host: test.com HTTP/1.1 200 OK Connection: close Server: TUX/2.0 (Linux) Connection closed by foreign host. host not defined, tux is finding the right file mcd at mcdlp:~$ telnet 192.168.24.102 80 Trying 192.168.24.102... Connected to 192.168.24.102. Escape character is '^]'. GET /a.cgi HTTP/1.0 Host: xxxx.com Connection closed by foreign host. Trying 192.168.24.102... Connected to 192.168.24.102. Escape character is '^]'. GET /test.cgi HTTP/1.0 Host: test.com HTTP/1.1 200 OK Content-Type: text/plain Date: Sat, 24 Apr 2004 04:15:47 GMT Server: TUX/2.0 (Linux) Content-Length: 68 #!/usr/bin/perl print "Content-type: text/html\n\n"; print "asdf"; Connection closed by foreign host. test.cgi #!/usr/bin/perl print "Content-type: text/html\n\n"; print "asdf"; a.c #include int main() { printf("Content-type: text/html\n\n"); printf("C Program\n"); } j.pl #!/usr/bin/perl print "Content-type: text/html\n\n"; print "asdfasdf"; I've googled but have found a host of other posts asking the same question. I've got the printk debugging and dprintk on, but they haven't yielded too many clues. Any help would greatly be appreciated. Thank you. --Chris Davies http://www.daviesinc.com/ From mcd at daviesinc.com Thu Apr 29 00:54:35 2004 From: mcd at daviesinc.com (Chris Davies) Date: Wed, 28 Apr 2004 20:54:35 -0400 Subject: Another tux caveat Message-ID: <1083200075.1020.11.camel@mcdlp.pbi.daviesinc.com> Kernel 2.4.25-tux running Tux 3 userspace Apache 1.3.29 I have a server where I have tux.mime.types set to redirect .php and .shtml files. I have multiple IPs on this machine, tux serves just fine, hands any 404 request to the backend (since index.html is not found) and things are great. However, I have one IP address where I don't want to have tux serve due to the fact that there is content that should be behind http auth protection. So, I echo 'http://192.168.24.102:80' > /proc/net/tux/0/listen/0 I start tux, start apache. with index.html present in the directories for both .102 and .103, Tux will answer fine on .102, apache answers fine on .103. However, when I remove index.html and put index.php there, tux refuses to pass the request to the backend if it comes in on .102. If I put 404.html in there, tux will serve that. Of course, changing the listen statement back to http://0.0.0.0:80, will allow tux to serve both 24.102 and 24.103 on port 80 and will properly redirect to the apache backend. ErrorDocument 404 /index.html ServerAdmin webmaster at test.com DocumentRoot /var/www/test.com ServerName www.test.com ServerAlias test.com *.test.com CustomLog /var/log/apache/test.com-access.log combined ErrorDocument 404 /index.html ServerAdmin webmaster at test.com DocumentRoot /var/www/test2.com ServerName www.test.com ServerAlias test.com *.test.com CustomLog /var/log/apache/test.com-access.log combined Any thoughts as to what I might be doing wrong? From diogenes at vgernet.net Thu Apr 29 17:55:08 2004 From: diogenes at vgernet.net (Ralph E. Kenyon, Jr.) Date: Thu, 29 Apr 2004 13:55:08 -0400 Subject: Another tux caveat In-Reply-To: <1083200075.1020.11.camel@mcdlp.pbi.daviesinc.com> References: <1083200075.1020.11.camel@mcdlp.pbi.daviesinc.com> Message-ID: On Wed, 28 Apr 2004 20:54:35 -0400, Chris Davies wrote: > Kernel 2.4.25-tux > running Tux 3 userspace > Apache 1.3.29 > > I have a server where I have tux.mime.types set to redirect .php and > .shtml files. > > I have multiple IPs on this machine, tux serves just fine, hands any 404 > request to the backend (since index.html is not found) and things are > great. > > However, I have one IP address where I don't want to have tux serve due > to the fact that there is content that should be behind http auth > protection. > > So, I echo 'http://192.168.24.102:80' > /proc/net/tux/0/listen/0 > > I start tux, start apache. with index.html present in the directories > for both .102 and .103, Tux will answer fine on .102, apache answers > fine on .103. > > However, when I remove index.html and put index.php there, tux refuses > to pass the request to the backend if it comes in on .102. > > If I put 404.html in there, tux will serve that. Of course, changing > the listen statement back to http://0.0.0.0:80, will allow tux to serve > both 24.102 and 24.103 on port 80 and will properly redirect to the > apache backend. > > > ErrorDocument 404 /index.html > ServerAdmin webmaster at test.com > DocumentRoot /var/www/test.com > ServerName www.test.com > ServerAlias test.com *.test.com > CustomLog /var/log/apache/test.com-access.log combined > > > > ErrorDocument 404 /index.html > ServerAdmin webmaster at test.com > DocumentRoot /var/www/test2.com > ServerName www.test.com > ServerAlias test.com *.test.com > CustomLog /var/log/apache/test.com-access.log combined > > > Any thoughts as to what I might be doing wrong? > > > _______________________________________________ > tux-list mailing list > tux-list at redhat.com > https://www.redhat.com/mailman/listinfo/tux-list See if this is relevant to your situation. It helped me on my Redhat 9 setup. http://www.redhat.com/archives/tux-list/2003-May/msg00011.html -- Ralph E. Kenyon, Jr. http://www.xenodochy.org/ralph.html 191 White Oaks Road Williamstown, MA 01267-2259 Phone: 413-458-3597 Home pages: http://www.xenodochy.org http://www.ballroomdances.org ------------------------------------------------------- FIGHT SPAM http://www.xenodochy.org/diogenes/antispam.html (If you are thinking about collecting my email address, read the above page first!) -------------------------------------------------------- Keep our semantic environments and cyberspace clean. Always report errors discovered while surfing the web. ------------------------------------------------------ My favorite saying (from general semantics): It's not that seeing is believing, believing is seeing, and we're much better at believing than we are at seeing. From mcd at daviesinc.com Thu Apr 29 18:32:58 2004 From: mcd at daviesinc.com (Chris Davies) Date: Thu, 29 Apr 2004 14:32:58 -0400 Subject: Another tux caveat In-Reply-To: References: <1083200075.1020.11.camel@mcdlp.pbi.daviesinc.com> Message-ID: <1083263578.1009.1.camel@mcdlp.pbi.daviesinc.com> On Thu, 2004-04-29 at 13:55, Ralph E. Kenyon, Jr. wrote: > See if this is relevant to your situation. It helped me on my Redhat 9 > setup. That was our prior correspondence. :) The problem here is that everything works properly as long as tux is instructed to listen to http://0.0.0.0:80 As soon as I specify an IP to listen to, excluding all of the other IPs on the machine, tux does indeed answer properly on the port, but its behavior changes in that 404s are no longer passed to the backend. Reset listen to http://0.0.0.0:80, works like a champ. From miles at pcextremist.com Thu Apr 29 18:38:30 2004 From: miles at pcextremist.com (Miles Elam) Date: Thu, 29 Apr 2004 11:38:30 -0700 Subject: Benchmarks Message-ID: <40914BA6.4080700@pcextremist.com> Has anyone made any speed/CPU usage comparisons between TUX and Apache 2.x? I am especially curious about comparative flat file performance with the 2.6 kernel, TUX, and Apache with the worker MPM. The last comparisons I've seen were between Apache 1.3.x on the 2.4 kernel. Since Apache 2.x uses sendfile(...) these days, I guess what I'm really asking about is the overhead of the context switch to userspace. Nevertheless, for whatever reason... How big a difference is there in CPU/mem usage, and how big a pipe do you need before the differences become significant? If no one's done it, I'll have to do them myself; But I figured that I'd check if someone else has done it first and save myself some time. - Miles Elam From mcd at daviesinc.com Thu Apr 29 19:01:11 2004 From: mcd at daviesinc.com (Chris Davies) Date: Thu, 29 Apr 2004 15:01:11 -0400 Subject: Benchmarks In-Reply-To: <40914BA6.4080700@pcextremist.com> References: <40914BA6.4080700@pcextremist.com> Message-ID: <1083265271.1009.28.camel@mcdlp.pbi.daviesinc.com> On Thu, 2004-04-29 at 14:38, Miles Elam wrote: > Has anyone made any speed/CPU usage comparisons between TUX and Apache > 2.x? I am especially curious about comparative flat file performance > with the 2.6 kernel, TUX, and Apache with the worker MPM. The last > comparisons I've seen were between Apache 1.3.x on the 2.4 kernel. > Since Apache 2.x uses sendfile(...) these days, I guess what I'm really > asking about is the overhead of the context switch to userspace. I'm not a fan of benchmarks, however, I have been running apache2/mpm-worker behind tux and when the machine does <10mb/sec, there is a negligable difference between tux and apache serving. Get above 15mb/sec and you start to see tux pull ahead. At 20-30mb/sec, tux really seems to do the trick and is considerably faster than apache. Apache was not engineered for speed, but mpm-worker is indeed the fastest model that they have. Some odd statistics: at 8mb/sec, we were at 20% CPU utilization at 12mb/sec, we were at 18% CPU at 16mb/sec, we were ~15% at 30mb/sec, we generally sit around 12% I don't know why. Sites are heavily biased towards two IP addresses out of 16 on that machine. This is running 2.4+tux. For 2.6 tux, there are some improvements, apache seems to pick up some speed, probably through some of the 2.6 improvements. I've not served enough data with 2.6 to have any real impressions. I don't have enough large files (and I have tux set not to touch anything >10mb anyhow) to really see what would happen over a long download. Since you're using mpm-worker, I guess you don't need php since php4 requires apache2-prefork. Even so, we haven't found apache2-prefork/php4 to be a stable combination anyhow. Not that tux isn't extremely fast. We are using it to squeeze extra performance out of existing hardware. About the only userspace webservers that I have seen that come close are X15 by Chromium, Zeus, and perhaps thttpd (which does support php4 sapi). There's been mention of another one, fthttpd or something, but we haven't worked with it. http://www.spec.org/web99/results/web99.html Again, spec charges some money for people to buy the test suite, and I doubt many open source projects have the cash to throw there for bragging rights. I think Chromium is in there, IBM may have tested apache2, but IIS, Tux and Zeus seem to dominate the list. Even Tux 1.0 has some pretty respectible numbers. The other problem I have with Spec is that it is very difficult to get a decent comparision of two machines. Almost noone runs the same test on the same hardware with different web servers. Besides, the test suite is supposed to simulate average traffic. I average traffic on the machines we deal with are 25 images + 1 html per pageload. Images range from 2-8k, html is generally 12-14k and processed through a module we wrote. I have another machine that we are experimenting with that has much larger images and less html. Even with that one, there is quite an improvement over apache. Yes, we have heavily tweaked apache's config, so, its not like we're going with an unconfigured apache versus tux. If you want more out of apache, also consider the 10K patches by that ex-SGI guy. Although I think most of those patches are for 1.3 only. For a true test, run mpm-worker, get it set up and running. Then, change the Port to 81 (or 8080 or whatever), stop apache, turn tux on, restart apache and see. It is very easy to turn tux on and off without much interruption. From miles at pcextremist.com Thu Apr 29 19:35:58 2004 From: miles at pcextremist.com (Miles Elam) Date: Thu, 29 Apr 2004 12:35:58 -0700 Subject: Benchmarks In-Reply-To: <1083265271.1009.28.camel@mcdlp.pbi.daviesinc.com> References: <40914BA6.4080700@pcextremist.com> <1083265271.1009.28.camel@mcdlp.pbi.daviesinc.com> Message-ID: <4091591E.20205@pcextremist.com> Thanks for the reply! Chris Davies wrote: >I'm not a fan of benchmarks > Yeah, I know. Lies, damn lies, and statistics (benchmarks). I like using them to find tendencies rather than absolutes. Just after I emailed, I found this: http://www.litespeedtech.com/benchmark.html I took it with a great big grain of salt considering it's a company trying to sell a competing product, but I couldn't see an immediate reason why their relative numbers between TUX and Apache would be conspicuously off. Unfortunately, it's also with the 2.4 kernel, not 2.6. I certainly wish they had specified which MPM they were using for Apache2 though. >For 2.6 tux, there are some improvements, apache seems to pick up some >speed, probably through some of the 2.6 improvements. I've not served >enough data with 2.6 to have any real impressions. > > I would imagine TUX isn't hurt by the transition either. Oh well. >I don't have enough large files (and I have tux set not to touch >anything >10mb anyhow) to really see what would happen over a long >download. > > Why is this? TUX streams the output doesn't it? So why would file size make a difference? I guess I could see for PHP perhaps, but why for static files? >Since you're using mpm-worker, I guess you don't need php since php4 >requires apache2-prefork. Even so, we haven't found >apache2-prefork/php4 to be a stable combination anyhow. > > I am no big fan of PHP to be honest. I've just used the worker MPM with php_cgi. To be frank, if dynamic content performance were a premium for a project, I wouldn't use PHP. Not saying it's for everyone, but for me the advantages to using Apache2 outweigh the drawbacks of using PHP in CGI mode. Basically I just use it for the admin utilities so load hasn't been an issue. If php_cgi gets more than 2 requests a second, I would consider it heavy usage. For the most part, my dynamic servers are set up behind Apache in a multiple reverse proxy setup for better performance. But reduced load for static is still reduced load; Hence the questions about relative TUX performance. >Almost noone runs the same test on the same hardware with >different web servers. > > Yup. This makes relative comparisons few and far between. (eg. With 4GB of RAM, FooMHz CPU, and a 8GB dataset, web server A gets X% less performance than server B.) >I have another machine that we are >experimenting with that has much larger images and less html. Even with >that one, there is quite an improvement over apache. > > Good to hear about. >For a true test, run mpm-worker, get it set up and running. Then, >change the Port to 81 (or 8080 or whatever), stop apache, turn tux on, >restart apache and see. It is very easy to turn tux on and off without >much interruption. > > Yup. I also like the fact that with TUX, I can toggle individual static file service by switching the "everyone" read rights. In addition, there's something to be said for having TUX serve pre-compressed static files with gzip -9. Thank you very much for the reply. I really appreciate it. - Miles Elam From williama_lovaton at coomeva.com.co Thu Apr 29 19:47:55 2004 From: williama_lovaton at coomeva.com.co (William Lovaton) Date: 29 Apr 2004 14:47:55 -0500 Subject: Benchmarks In-Reply-To: <4091591E.20205@pcextremist.com> References: <40914BA6.4080700@pcextremist.com> <1083265271.1009.28.camel@mcdlp.pbi.daviesinc.com> <4091591E.20205@pcextremist.com> Message-ID: <1083268075.16885.37.camel@localhost.localdomain> Hi Miles, El jue, 29-04-2004 a las 14:35, Miles Elam escribi?: > If php_cgi gets more than 2 requests a second, I > would consider it heavy usage. Our production web application gets 28 requests per second average. The max value I have ever seen is 81. I'm using Apache 1.3, Tux 2.2 and PHP 4.3.4 over a RedHat 9 system, kernel 2.4.20. I'm looking forward for Fedora Core 2. -William From mcd at daviesinc.com Thu Apr 29 20:10:42 2004 From: mcd at daviesinc.com (Chris Davies) Date: Thu, 29 Apr 2004 16:10:42 -0400 Subject: Benchmarks In-Reply-To: <1083268075.16885.37.camel@localhost.localdomain> References: <40914BA6.4080700@pcextremist.com> <1083265271.1009.28.camel@mcdlp.pbi.daviesinc.com> <4091591E.20205@pcextremist.com> <1083268075.16885.37.camel@localhost.localdomain> Message-ID: <1083269442.1009.37.camel@mcdlp.pbi.daviesinc.com> one one client box: Tux = 81 requests/second Apache2 = 9 requests/second Machine is pushing 25.34mb/sec P3/1ghz, 512mb RAM, 100mb Full Duplex top - 16:08:59 up 114 days, 21:49, 1 user, load average: 0.43, 0.57, 0.53 Tasks: 134 total, 2 running, 132 sleeping, 0 stopped, 0 zombie Cpu(s): 0.7% user, 8.5% system, 0.0% nice, 90.8% idle Mem: 514940k total, 510320k used, 4620k free, 0k buffers Swap: 979956k total, 3956k used, 976000k free, 259816k cached From williama_lovaton at coomeva.com.co Thu Apr 29 21:39:47 2004 From: williama_lovaton at coomeva.com.co (William Lovaton) Date: 29 Apr 2004 16:39:47 -0500 Subject: Benchmarks In-Reply-To: <1083269442.1009.37.camel@mcdlp.pbi.daviesinc.com> References: <40914BA6.4080700@pcextremist.com> <1083265271.1009.28.camel@mcdlp.pbi.daviesinc.com> <4091591E.20205@pcextremist.com> <1083268075.16885.37.camel@localhost.localdomain> <1083269442.1009.37.camel@mcdlp.pbi.daviesinc.com> Message-ID: <1083274784.16881.50.camel@localhost.localdomain> Ohh... my numbers, Tux = 160 req/sec Avg. (280 Max) Apache 1.3 = 28 req/sec Avg. (81 Max) SMP 4x PIII 550MHz, 2GB RAM, 100MB Full Duplex My load average is between 6 and 20 (25 under xtreme load) What does exactly mean this number?? how is it calculated? This is a big enterprise app, highly trasactional. Right now is serving 550 concurrent users. El jue, 29-04-2004 a las 15:10, Chris Davies escribi?: > one one client box: > > Tux = 81 requests/second > Apache2 = 9 requests/second > Machine is pushing 25.34mb/sec How do you get this number?? (25.34mb/sec) > P3/1ghz, 512mb RAM, 100mb Full Duplex > > top - 16:08:59 up 114 days, 21:49, 1 user, load average: 0.43, 0.57, > 0.53 > Tasks: 134 total, 2 running, 132 sleeping, 0 stopped, 0 zombie > Cpu(s): 0.7% user, 8.5% system, 0.0% nice, 90.8% idle -William From mcd at daviesinc.com Fri Apr 30 15:42:29 2004 From: mcd at daviesinc.com (Chris Davies) Date: Fri, 30 Apr 2004 11:42:29 -0400 Subject: Benchmarks In-Reply-To: <1083274784.16881.50.camel@localhost.localdomain> References: <40914BA6.4080700@pcextremist.com> <1083265271.1009.28.camel@mcdlp.pbi.daviesinc.com> <4091591E.20205@pcextremist.com> <1083268075.16885.37.camel@localhost.localdomain> <1083269442.1009.37.camel@mcdlp.pbi.daviesinc.com> <1083274784.16881.50.camel@localhost.localdomain> Message-ID: <1083339749.5390.22.camel@mcdlp.pbi.daviesinc.com> On Thu, 2004-04-29 at 17:39, William Lovaton wrote: > Ohh... my numbers, > > Tux = 160 req/sec Avg. (280 Max) > Apache 1.3 = 28 req/sec Avg. (81 Max) > SMP 4x PIII 550MHz, 2GB RAM, 100MB Full Duplex > > My load average is between 6 and 20 (25 under xtreme load) load is the average number of jobs in the queue over the last minute, five minutes and 15 minutes. I have never seen my tux machine get over .8 -- even when serving 60mb/sec. I don't really think load average is a very good number other than a rough generalization. I've been on machines where the average is at 1.5 and the machine is as slow as mud, and I've been on machines where the load was 20 and it was still lightning quick. Other numbers seem to be better indications of performance and bottlenecks. However, hearing that your load is that high, I would say that something is causing you to fork processes frequently. Does the machine run heavy cgi? > This is a big enterprise app, highly trasactional. Right now is serving > 550 concurrent users. Not too bad. I've got a few machines that apache claims it needs more than MaxClients 1500 -- and no, I don't run keepalive. > > Machine is pushing 25.34mb/sec > How do you get this number?? (25.34mb/sec) right off the switch port. From williama_lovaton at coomeva.com.co Fri Apr 30 16:31:34 2004 From: williama_lovaton at coomeva.com.co (William Lovaton) Date: 30 Apr 2004 11:31:34 -0500 Subject: Benchmarks In-Reply-To: <1083339749.5390.22.camel@mcdlp.pbi.daviesinc.com> References: <40914BA6.4080700@pcextremist.com> <1083265271.1009.28.camel@mcdlp.pbi.daviesinc.com> <4091591E.20205@pcextremist.com> <1083268075.16885.37.camel@localhost.localdomain> <1083269442.1009.37.camel@mcdlp.pbi.daviesinc.com> <1083274784.16881.50.camel@localhost.localdomain> <1083339749.5390.22.camel@mcdlp.pbi.daviesinc.com> Message-ID: <1083342694.18079.45.camel@localhost.localdomain> Hi Chris, El vie, 30-04-2004 a las 10:42, Chris Davies escribi?: > > My load average is between 6 and 20 (25 under xtreme load) > > load is the average number of jobs in the queue over the last minute, > five minutes and 15 minutes. I have never seen my tux machine get over > .8 -- even when serving 60mb/sec. > > I don't really think load average is a very good number other than a > rough generalization. I've been on machines where the average is at 1.5 > and the machine is as slow as mud, and I've been on machines where the > load was 20 and it was still lightning quick. Other numbers seem to be > better indications of performance and bottlenecks. Load average is a good number to look at. The thing is that a 1.5 load means there are almost 2 processes in execution state. It doesn't mean that you have only 2 users concurently. If a PHP process is connecting to the database (or any other kind of I/O) it will be sleep and won't be counted as a running process... However the web application is still "executing" and hence the perception of "slowness". A high load means that there are processes ready to be run but the OS can't run them because the CPU is busy. Eg: Number of runnable processes is bigger than the number of processors. > > However, hearing that your load is that high, I would say that something > is causing you to fork processes frequently. Does the machine run heavy > cgi? It runs PHP as an Apache module _not_ as an CGI. But yeah, it could be considered heavy due to the number of users. It forks processes sometimes, but it is not often due to the Min/Max Spare Servers directive. 560 users represents about 40 Apache/PHP processes in the web server. And in peak load in can reach 80 but this is not common. Before, without TUX it reached 250 processes (the max limit) easily... so TUX is really a magic thing. > > This is a big enterprise app, highly trasactional. Right now is serving > > 550 concurrent users. > Not too bad. I've got a few machines that apache claims it needs more > than MaxClients 1500 -- and no, I don't run keepalive. I have MaxClientes 100, very low I know but I dont seem to need more. > > > > Machine is pushing 25.34mb/sec > > How do you get this number?? (25.34mb/sec) > right off the switch port. Neat! I'll talk with the net guy here. ;-) -William From mcd at daviesinc.com Fri Apr 30 19:09:00 2004 From: mcd at daviesinc.com (Chris Davies) Date: Fri, 30 Apr 2004 15:09:00 -0400 Subject: Benchmarks In-Reply-To: <1083342694.18079.45.camel@localhost.localdomain> References: <40914BA6.4080700@pcextremist.com> <1083265271.1009.28.camel@mcdlp.pbi.daviesinc.com> <4091591E.20205@pcextremist.com> <1083268075.16885.37.camel@localhost.localdomain> <1083269442.1009.37.camel@mcdlp.pbi.daviesinc.com> <1083274784.16881.50.camel@localhost.localdomain> <1083339749.5390.22.camel@mcdlp.pbi.daviesinc.com> <1083342694.18079.45.camel@localhost.localdomain> Message-ID: <1083352140.5390.71.camel@mcdlp.pbi.daviesinc.com> On Fri, 2004-04-30 at 12:31, William Lovaton wrote: > Hi Chris, > > El vie, 30-04-2004 a las 10:42, Chris Davies escribi?: > > > My load average is between 6 and 20 (25 under xtreme load) > > > > load is the average number of jobs in the queue over the last minute, > > five minutes and 15 minutes. I have never seen my tux machine get over > > .8 -- even when serving 60mb/sec. > > > > I don't really think load average is a very good number other than a > > rough generalization. I've been on machines where the average is at 1.5 > Load average is a good number to look at. The thing is that a 1.5 load > means there are almost 2 processes in execution state. It doesn't mean Right, but you can have a low load and be io bound and have a system that is slow. or cpu bound and have a system that is relatively responsive and a high load. It is one of a few factors to take into consideration. > > However, hearing that your load is that high, I would say that something > > is causing you to fork processes frequently. Does the machine run heavy > > cgi? > > It runs PHP as an Apache module _not_ as an CGI. But yeah, it could be > considered heavy due to the number of users. then where is the bottleneck? Something is keeping processes in the run queue. IO? VM? > > > This is a big enterprise app, highly trasactional. Right now is serving > > > 550 concurrent users. > > Not too bad. I've got a few machines that apache claims it needs more > > than MaxClients 1500 -- and no, I don't run keepalive. > > I have MaxClientes 100, very low I know but I dont seem to need more. that's what tuning is all about. Finding the right config for each machine. We've got a bunch of machines that we manage, and short of a few defaults to get them started, we spend time watching and figuring out the traffic to tune them. Some of our clients have machines where apache with keepalive would bog down the machine. When you have 30-40 images + 1 html + CSS + an included javascript, you have generally 5x as many connections as actual users. Tux handles this incredibly. Dreamweaver creates quite a need for Tux on busy sites. haha. For us, now that I figured out the apache 1.3 problem I was having, it is a simple drop-in solution. I'm curious, have you gotten the php4-tux sapi to work? I've not gotten the CGI to work, but I think if I can get both CGI and PHP to work with tux, there won't be much that apache needs to do.