tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <rosenberg.l...@googlemail.com>
Subject Re: Securing Tomcat Article for Review
Date Wed, 10 Jan 2007 12:32:45 GMT
On 1/10/07, Mikolaj Rydzewski <miki@ceti.pl> wrote:
> Leon Rosenberg wrote:
> > Still, since you can guarantee that everything is in memory if you
> > customize your webapp, and apache httpd simply relies on the file
> > system cache which has it's own behaviour, not designed for your
> > webapp, a single filesystem "miss" will cost more time than you'll
> > ever win by maybe saving some system calls.
> Using sendfile() system call you win by not copying data through FS - IO
> cache - user space - JVM streams - network sockets, system 'just' copies
> data from FS/IO cache to network socket. Much, much more faster.

As long as its in the io cache and haven't to be read from disk, right?

>
> You don't want to keep all static content in memory, for JVM to send it? ;-)

Why not? If my sole purpose is to serve this content I would surely do this.

> > I also assume that a modern server will never reach its cpu limit
> > before reaching the bandwith limit by simply writing out data.
> The less resource expensive your solution is, the more apps/servers/etc
> you can run on single machine. That means less money you have to spend,
> or more bussiness you can run.

Irrelevant if the bandwidth is your limit. I don't care whether my
server has 50% idle time or 20% if it just simply not able to send
more because of the bandwidth limitation. And if the concurrency is
your problem (meaning you have far too many clients) than I think
context switches will be more of a problem than copying.
At least that was the problem we had with apache serving static
content (long time ago).

However this is completely off-topic by now, so lets just abandon this
branch :-)

regards
Leon

>
> --
> Mikolaj Rydzewski <miki@ceti.pl>
>
>
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message