[Zope] Zope's performance on xBSD
Chris McDonough
chrism@zope.com
Fri, 17 Aug 2001 10:38:40 -0400
Hi Giorgios,
Let me see if I understand the testing methodology and results... You
generate load using your program, and while the program is running, you
try to reload the page in a browser.. right?
Furthermore, your test results show that on Linux, the time it takes to
reload the page under any of the tested loads is virtually the same,
while on BSD, the time that it takes to reload the page appears to be
related to the load in an O(n^2) way.
I don't know the answer, but I just want to restate the findings in
another way so that you can tell me if I'm misunderstanding them.
- C
Giorgos Verigakis wrote:
>
> Hello, I'm using Zope on FreeBSD and OpenBSD and I've noticed some
> serious performance issues. Since I hadn't experienced any problems
> at the past with Linux, I did some benchmarks.
>
> I've written a small program that connects to Zope and tries to
> retrieve a non-existant URL (source code appended). While Linux
> performed almost linearly depending on the number of hits/sec,
> FreeBSD and OpenBSD performed exponential.
>
> I did the following experiment:
> I installed a binary distribution of python-1.5.2 (pkg_add or apt-get)
> and I compiled Zope-2.3.3+HotFix from sources (with wo_pcgi.py).
> I entered Zope's management screen and expanded all folders. I ran
> the previous program and after about 1000 hits I reloaded the page
> and measured the time it gets to finish. The results are below:
>
> |---------------------+------------+---------------+-------------+
> | OS | Hit Rate* | Real hit rate | Reload time |
> | | (hits/sec) | (hits/sec) | (sec) |
> |---------------------+------------+---------------+-------------+
> | | 30 | 20 | 13 |
> | Linux debian 2.2.19 | 50 | 33 | 16 |
> | | 100 | 38 | 16 |
> |---------------------+------------+---------------+-------------+
> | | 30 | 20 | 10 |
> | FreeBSD 4.3-Release | 50 | 33 | 23 |
> | | 100 | 40 | 100 |
> |---------------------+------------+---------------+-------------+
> | | 30 | 20 | 10 |
> | OpenBSD 2.9-Release | 50 | 33 | 15 |
> | | 100 | 50 | 285 |
> |---------------------+------------+---------------+-------------+
> *The hit rate is the one passed as an argument to the program, while
> real hit rate was calculated according to Zope's log file.
>
> All tests were ran on the same computer, a 600MHz Celeron with
> 192MB RAM
>
> These tests were ran using the default Data.fs. When I use a real
> Data.fs + my products I even get time outs when I try to access
> the content.
> Why is there such a difference between the OSs? Do the BSD users of
> this list experience similar problems?
>
> Giorgos Verigakis
>
> ------------------ 8< ------------------
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> #include <sys/types.h>
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <netdb.h>
>
> int main(int argc, char *argv[])
> {
> struct sockaddr_in sa;
> struct hostent *hp;
> int s;
> int i, t, len;
> unsigned long sleeptime;
> char request[128];
> char *url="/foo";
>
> if (argc != 4) {
> printf("Usage: %s <host> <port> <rate>\n", argv[0]);
> printf("rate in hits/sec\n");
> exit(1);
> }
>
> if ((hp = gethostbyname(argv[1])) == NULL) {
> printf("error looking up host\n");
> exit(1);
> }
>
> sprintf(request, "GET %s HTTP/1.0\015\012\015\012", url);
> len = strlen(request);
> sleeptime = (1 / atof(argv[3])) * 1000000;
>
> bzero(&sa, sizeof(sa));
> bcopy(hp->h_addr, (char *)&sa.sin_addr, hp->h_length);
> sa.sin_family = hp->h_addrtype;
> sa.sin_port = htons(atoi(argv[2]));
>
> for (i = 0;; i++) {
> if (( s= socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) {
> printf("Socket error\n");
> continue;
> }
>
> if (connect(s, (struct sockaddr *) &sa, sizeof sa) < 0) {
> printf("Connection error\n");
> close(s);
> continue;
> }
>
> t = write(s, request, len);
> printf("i=%d: %d bytes\n", i, t);
>
> usleep(sleeptime);
>
> close(s);
> }
> }
> ------------------ 8< ------------------
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
--
Chris McDonough Zope Corporation
http://www.zope.org http://www.zope.com
""" Killing hundreds of birds with thousands of stones """