httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Min Xu <>
Subject Re: Strange Behavior of Apache 2.0.43 on SPARC MP system
Date Wed, 12 Feb 2003 17:52:03 GMT
On Wed, Feb 12, 2003 at 12:30:28AM -0500, Cliff Woolley wrote:
> Of course the client isn't spinning, but your statement that "the server
> should have done its job" assumes that the entire response is sent at
> once.  Depending on its length, it is entirely possible that the server
> would send the response in multiple packets.  But as soon as *any* packets
> arrive, the client is woken up.  That means that the server and the client
> are vying for timeslices.  Let's say the client gets it.  The client
> receives the partial response and then goes right back to sleep again.
> Sure the server wakes right back up and starts sending more of the
> response, but in the meanwhile, several context switches had to happen.

I am sorry for my bad assumption. The reason I thought that was "mostly"
the case that server has done its job is the following:

I have a file repository contains about 20000 files in one directory.
I know all in one directory is bad, but I didn't have time to fix
the client about this. And 15000 out of this 20000 files are smaller
than 8K, which is the page size of the system. I thought in terms of DMA,
the file smaller than 8K should be transfered in one shot.

Anyway, I think your point is valid, and Justin's hypothesis about the
backplane/disk being bottleneck is also very interesting. So I did some
more experiments this morning.

First, I don't think the disk should be bottleneck in any case, this is
because the system has 2GB memory, Solaris's file cache is able to cache
all the file content. top shows the following stats:

load averages:  4.05,  4.68,  5.25                                     10:33:36
47 processes:  45 sleeping, 2 on cpu
CPU states: 51.2% idle, 11.3% user, 27.8% kernel,  9.8% iowait,  0.0% swap
Memory: 2048M real, 1327M free, 508M swap in use, 3256M swap free

The total file size is < 500MB, so there is no reason solaris can't cache
them all.

To test the context switching hypothesis and the backplane hypothesis
I changed all files in the repository to 2 bytes long, that's an "a"
plus an "eof". I rerun the experiment, the performance is poorer!

with normal file size:
  0us delay: system xput ~= 2500 pages/sec
  3us delay: system xput ~= 4700 pages/sec

with 2byte file size:
  0us delay: system xput ~= 1900 pages/sec
  3us delay: system xput ~= 1700 pages/sec
 10us delay: system xput ~= 1700 pages/sec

It seems that the bottleneck is some where else, and the bottleneck is
stressed harder when file size is smaller. But I doubt it is the backplane
or the context switching.


Rapid keystrokes and painless deletions often leave a writer satisfied with
work that is merely competent.
  -- "Writing Well" Donald Hall and Sven Birkerts

View raw message