> More data:
>
> I duplicated the www.sqlite.org website on my desktop then started
> hammering on it using multiple instances of "wget -r".  I ran the
> test for several minutes.
>
> During this test, every hit involved multiple SELECTs and at least
> one UPDATE against a single sqlite database file.  The database engine
> was easily able to handle a rate of over 2500000 (2.5M) hits/day or
> about 30 hits/second.  The database did not appear to be the limiting
> factor in this test - other components (such as the customized web
> server that www.sqlite.org uses and the exec()-ing of RCS commands)
> seemed to be what kept it from going even faster.
> ....
>

One of the reasons we decided to use SQLite over other SQL dbs, is the speed
in which it can be used to do simple database access very quickly.  Just as
another example of how suited SQLite can be used for web servers (or any
server).

We have a server application which handles logins.  There are two types of
logins, a regular login and a signup login.  The first requries 3 selects
and an Update, while the second requires 2 selects and an insert.  A user is
considered logged in after either of the two write sequences (update /
insert).  All database access is handled in a single thread which
synchronizing DB access so that only one SQL command can happen at a time.
All socket handling is handled in another thread an is optimized for it's OS
(IO Completion ports for windows, BSD Sockets for the rest).  Also socket
code is encrypted (which adds more overhead obviously).  Also only after
login does content get streamed to the user (content obviously varies
depending on login sequence).

With the above as it is (which is a little more complicated than a webserver
spitting out pages, but not as complicated as it could get), I can get from
400-500 logins / second.  Now from my research, depending on the hardware, a
normal web server can get up close to 2000 requests served / second, so this
isn't far off considering the overhead.

There is absolutely no reason not to use SQLite on a single web server even
with LARGE amounts of traffic and hits.  Though when scaling to multiple
servers over multiple POPs, then another solution will have to be used.

Jay Macaulay



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

Reply via email to