[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New snapshot: MVC and more

From: Dmitry Borodaenko
Subject: New snapshot: MVC and more
Date: Tue, 1 May 2007 23:06:01 +0100

The new Samizdat version has finally reached the point where it's
stable enough for a Debian package.

Source snapshot:

Package should appear in Debian/experimental in a few hours, package
changelog gives a short summary of what's there:

samizdat ( experimental; urgency=low

 * New upstream snapshot 2007-05-01:
   - refactored into MVC pattern (Apache config change required)
   - passwd renamed to password (database change required)
   - compatible with Ruby 1.8.6
   - CSRF protection added
   - lighttpd support added
   - diff now includes images and file links
   - actions in moderation log translated
   - updated translations: Spanish, Russian, Belarusian

Unscientific benchmarking shows that this version is in fact
considerably faster than old code:

item                    19.18   20.55   20.02   (requests per second)
frontpage               18.90   17.73   18.59   (requests per second)
frontpage from scratch  5004.284 (ms)
max memory              19m (100 requests per child limit)

lighttpd (fastcgi):
item                    22.18   21.27   17.87   (requests per second)
frontpage               15.98   17.34   14.62   (requests per second)
frontpage from scratch  4254.934 (ms)
max memory              46m (no limit)

ruby1.8                    1.8.6-1+b1
postgresql-8.2             8.2.4-1
apache2                    2.2.3-4
libapache2-mod-ruby        1.2.6-1.1
lighttpd                   1.4.15-1

Compare this with data from September:

20 requests per second is about as much as Ruby CGI can do (moving
away from cgi.rb is quite likely to improve this considerably). Good
news is that front page is now much less of a bottleneck (15 requests
per second instead of just 2), and the only loss of functionality
attributing to this is showhidden option, a variant of which will be
back soon.

The test was done on the same dataset (9000 published resources) on
the same hardware (1.5 GHz single-processor P3). CSRF protection
prevents me from doing the "kill the cache" test, instead of this I
tested how much time it takes to re-generate front page after full
cache flush (before re-factoring, it took around 12-20 seconds, now
it's 4-5 seconds). One more change in the test environment is that
MaxClients and lighttpd counterpart are set to 10, it makes no sense
to have it any bigger on a single-processor machine, all it would do
is introduce more context switching overhead and waste more memory.

Some of the performance increase can be attributed to newer Ruby and
PostgreSQL versions, removal of showhidden also had some impact on
database side, the rest is yet another proof that improving design of
the code eventually yields better results than direct optimization :)

Dmitry Borodaenko

reply via email to

[Prev in Thread] Current Thread [Next in Thread]