> -----Original Message-----
> From: GOMEZ Henri [mailto:[EMAIL PROTECTED]] 
> Sent: 24. lipanj 2002 14:21
> To: Tomcat Developers List
> Subject: RE: mod_jk cache and socket timeout
> 
> 
> >Basically I don't like the time. The alternative is to use something 
> >like GetTickCount().
> 
> there is no gettickcount under Unix, but you could use 
> gettickcount on WIN32 if it's faster.
> 

The APR on unix for apr_time_now() uses gettimeofday, and then we could
use the timeval's tv_sec, and on WIN32 GetTickCount, since all that
matters is the time interval.


> >The patch uses the semi-dynamic endpoint cache. One should 
> set the high 
> >enough worker.cachesize, and the number of opened channels will drop 
> >after worker.cache_timeout.
> 
> Tell use more about worker.cache_timeout.
> 

Well, worker.ajp13.cache_timeout=seconds (15) by default, will force all
the endpoints to be disconnected, which last access time exceeded the
set timeout, just like socket timeout does for found endpoint, and
socket itself.
That way we can handle the peek throughput relying only on the server,
without the need to make a dispatcher from 250->20 connections. 

> >Since IMO there was the general +1 for Jan's patch, here is
> >the original
> >with added endpoint timeout.
> 
> time_t now = time(NULL);
> 
> Is there faster alternative in apache ? time() is a consuming 
> call, and I recall hack from a SGI boy to speed Apache 1.3 in 
> avoiding use of time(), which are also in request_rec 
> (r->request_time) in apache 1.3 (time_t) and 2.0 (apr_time_t)
> 

Don't know for unix if the time() or gettimeofday() is faster, but using
gettimeofday we can retrieve the integer that can be handled more
efficiently then time_t. On WIN32 we should stick to GetTickCount, cause
its much faster, since there's no need to go to the MSVCRT, or do the
lenghty TZ conversions.

MT.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to