[Soks] Soks speed

[Soks] Soks speed

Copied from Email on Sun, 13 Mar 2005 15:35:09 +0000 from Tom Counsell (tamc2@cam.ac.uk)

Hi Bil

On 13 Mar 2005, at 14:26, Bil Kleb wrote:
> I know you say the architecture is never going to
> be speedy, but at what point do you anticipate
> a Soks Wiki will run out of steam?

Don't know,  Wiki's I have using it are in the low hundreds of pages  
and fine.

> We have a 1.7GHz P4 with 1GB whose only job is to
> serve a Soks Wiki.  At 463 pages (just a start for
> this Wiki), it is beginning to show signs of slowing
> down.  (For example, refreshing the recent changes
> page is taking several seconds.)

Ok, so you probably win the award for largest Soks wiki.  1GB  
presumably means no memory problem.

I think, but don't know, that page size is likely to be a much larger  
cause of slow-down than number of pages.

In the current release there was a bug that meant that the recent  
changes page just kept on growing rather than being capped at 200  
lines.  Is that the case with your wiki?   If so  you could try the fix  
in  
http://www.soks.org/view/ 
Bug:%20AutomaticRecentChanges%20ignores%20changes%20parameter.  Or, if  
you've done that you could try cranking down the changes parameter.

The other page that is likely to get large as you add pages is the site  
index page.  This can be mitigated a bit by switching to a multi page  
index (one page for each letter of the alphabet) by using  
AutomaticMultiPageIndex instead of AutomaticOnePageIndex.

My hope has been that Soks should be responsive to user interaction  
(viewing a page, making an edit etc) although there might a delay in  
the consequences of a user edit appearing (e.g. updating recent changes  
and site index, links to that page appearing in other pages) since  
these get queued in a separate lower priority thread.

The general bottleneck is likely to be the RollingMatch class in  
soks-view.rb.  When a page has been edited, this attempts to match page  
titles in the textile in order to create the links between pages  
automatically.  I expect my algorithm for this matching is far from  
optimal, so there is probably scope for improvement.

> Growing concerned,

Soks is only alpha, so I haven't thought about doing any profiling or  
speed optimisation yet.

I hadn't clicked how large a Wiki you were planning, so please accept  
my apologies for not forewarning you.

Tom

PS Just occurred to me, on some ruby versions on some platforms I had a  
problem in ruby/webrick where if there was a bug in my code the  
exception would somehow get stuck in the webrick code and cause a loop  
that would very slowly absorb all the available memory, causing  
everything to slow down and eventually crash with an out of memory  
error.  Probably not the problem in your case, but just in case I  
thought I would mention it.

_______________________________________________
Soks-discuss mailing list
Soks-discuss@rubyforge.org
http://rubyforge.org/mailman/listinfo/soks-discuss

Edit this page or watch for changes using RSS.