On Sun, Nov 29, 1998, Anthony Rumble wrote:

> > > > Im wondering how badly mod_perl will fragment up writes without writev
> > > > support..
> > > 
> > > Don't know, I've never did any performance tests.
> > > 
> > > > Maby Ill have to run two servers for now.. one with ssl and no writev, and
> > > > one without ssl with writev... as most of the work is done without SSL..
> > > 
> > > Hmmmm.... I would first check whether the not used writev() is really a
> > > network performance problem. Usually Apache's performance penalties exists at
> > > other corners, AFAIK. 
> > 
> > I will try and do some testing.. 
> > 
> > The fear is that each write calles generates a TCP packet.. which is very
> > bad indeed as the overheads for TCP are quite large.. For users on slow
> > links (which is a fact of life here in Australia), it can be disastrous..
> 
> Well, the good news is.. it doesn't matter. (Not for mod_perl anyway,
> which is what I am interested in).. It would have an impact on mod_include
> stuff though..
> 
> Heres the strace from the bog standard RedHat apache 1.3.3 with mod_perl
> 
> write(4, "HTTP/1.1 200 OK\r\nDate: Sun, 29 Nov 1998 06:53:19
> GMT\r\nServer: Apac
> he/1.3.3 (Unix)  (Red Hat/Linux) mod_perl/1.15\r\nPragma:
> no-cache\r\nExpires: 0
> \r\nCache-Control: no-cache\r\nConnection: close\r\nContent-Type:
> text/html\r\n\
> r\n<script language=\"Java"..., 821) = 821
> 
> The whole page all in one write.. very nice..
> 
> Now for Apache 1.3.3 mod_perl and mod_ssl..
> 
> write(4, "HTTP/1.1 200 OK\r\nDate: Sun, 29 Nov 1998 06:58:37
> GMT\r\nServer: Apac
> he/1.3.3 (Unix)  (Red Hat/Linux) mod_ssl/2.1.0 SSLeay/0.9.0b
> mod_perl/1.16\r\nPr
> agma: no-cache\r\nExpires: 0\r\nCache-Control: no-cache\r\nConnection:
> close\r\n
> Content-Type: text/html\r\n"..., 849) = 849
> 
> All in one write as well.. seems that apache buffers mod_perl stuff just
> like CGI.
> This is good, so I don't need to run dual servers now.. <phew>

Fine. But we can optimize it nevertheless a little bit.  Currently (2.1.0)
under EAPI a NO_WRITEV is forced.  This is forced for SSL _and_ NON-SSL
requests.  For SSL requests it's needed because we cannot do a real
SSL_writev(). But for NON-SSL requests we currently slow down the network I/O
without any need. I've found a good solution which I want to merge in to
2.1.1. With it NON-SSL requests are no longer slowed down.

BTW, for SSL requests a SSL_writev() seems not even make sense, because of the
re-fragmentation in the SSL record layer. So even when a SSL_writev() could
exists it would not write it's iovec is one step.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
Apache Interface to SSLeay (mod_ssl)   www.engelschall.com/sw/mod_ssl/
Official Support Mailing List               [EMAIL PROTECTED]
Automated List Manager                       [EMAIL PROTECTED]

Reply via email to