slowness after update

4 views
Skip to first unread message

Chris J. Davis

unread,
Jan 19, 2009, 10:31:08 AM1/19/09
to habar...@googlegroups.com
I tested the new code on localhost, found no issues and upgraded two
of my sites. cjd.org is now noticeably slower after the update. I have
tested both logged in and logged out, and there is quote a bit of
delay now.

Just thought I would pass this on. I haven't had time to look at how
the ACL stuff has been constructed, so I can't offer any insight/
suggestions at this time.

Chris

Chris Meller

unread,
Jan 19, 2009, 11:22:25 AM1/19/09
to habar...@googlegroups.com
This was also reported on -users [1], so you're not the only one having the problem.

FWIW, my first guess would be that it's the JOIN to get the posts each user can view causing the problem. I imagine on localhost you only had a handful of posts, but on your live blog you have many thousands more. It might be worth using the Lipsum plugin to generate a couple thousand posts on your local machine, just to confirm...

Here's hoping someone like Jay Pipes can optimize our query with his MySQL foo and we don't have to take another approach.


Andy C

unread,
Jan 19, 2009, 1:19:00 PM1/19/09
to habari-dev
I have a sandpit at r3402 with 722 posts that seems to be running
fineon Bluehost using mySQL. It you want to bash it with a blunt
instrument, feel free.

http://nbrightside.com/sandpit/


On Jan 19, 4:22 pm, "Chris Meller" <ch...@doesnthaveone.com> wrote:
> This was also reported on -users [1], so you're not the only one having the
> problem.
> FWIW, my first guess would be that it's the JOIN to get the posts each user
> can view causing the problem. I imagine on localhost you only had a handful
> of posts, but on your live blog you have many thousands more. It might be
> worth using the Lipsum plugin to generate a couple thousand posts on your
> local machine, just to confirm...
>
> Here's hoping someone like Jay Pipes can optimize our query with his MySQL
> foo and we don't have to take another approach.
>
> [1]http://groups.google.com/group/habari-users/browse_thread/thread/ae3f...

Chris Meller

unread,
Jan 19, 2009, 1:36:46 PM1/19/09
to habar...@googlegroups.com
Chris: Are you using MySQL or SQLite?

Chris J. Davis

unread,
Jan 19, 2009, 3:41:49 PM1/19/09
to habar...@googlegroups.com
I am using mysql.

Michael Bishop

unread,
Jan 20, 2009, 1:15:03 PM1/20/09
to habari-dev
At least in my VPS environment on Slicehost I'm not experiencing any
slowness with head (r3047), fwiw. I will keep an eye on the
diagnostics however.

~miklb

sfong15

unread,
Jan 25, 2009, 1:25:45 AM1/25/09
to habari-dev
I'm also with slicehost running a 256M slice running nginx with
optimized php/mysql. On one site running head mysqld was consuming
~90% CPU and took 20 seconds to load <next page> while on another site
running r29xx mysqld used ~2% CPU and took less than 3 seconds to
render <next page> at pagination link.

Both sites have more or less same amount of entries, i.e. ~1,100.

Is it just me having this?

Rich Bowen

unread,
Jan 25, 2009, 9:23:07 AM1/25/09
to habar...@googlegroups.com
No, it's everybody. I'm told that it's related to the new ACL stuff,
which, while very shiny, has performance side-effects. One assumes
that these will be resolved before we do another release, 'cause
performance like this is going to drive away users.


On Jan 25, 2009, at 01:25, sfong15 wrote:

> I'm also with slicehost running a 256M slice running nginx with
> optimized php/mysql. On one site running head mysqld was consuming
> ~90% CPU and took 20 seconds to load <next page> while on another site
> running r29xx mysqld used ~2% CPU and took less than 3 seconds to
> render <next page> at pagination link.
>
> Both sites have more or less same amount of entries, i.e. ~1,100.
>
> Is it just me having this?

--
In America, through pressure of conformity, there is freedom of
choice, but nothing to choose from. (Peter Ustinov)

ringmaster

unread,
Jan 29, 2009, 12:08:14 AM1/29/09
to habari-dev
This issue is a little tricky. It will behave differently when you're
logged in vs logged out, and may depend on how well your system
responded to recent permission upgrades (whether it added the tokens
and correctly assigned their access or not).

In any case, assuming things went well with your upgrade regarding
tokens, I hope that r3078 will offer a substantial gain in speed. If
things didn't go well with your upgrade, you likely can't see any
posts when you're logged out (or worse, you get no admin at all), in
which case I'm sure we'd have heard from you already.

The downside of the query is that it has the potential to return a
post more than once under certain conditions that the UI will not yet
let you create. Specifically, if you assign more than one token to a
post, and you have permission to access both tokens, you will see that
post twice. Currently, you can't assign tokens to posts. Someone
with more JOIN-fu than me should look at the query. It's a nasty
bugger, not because the query is complex, but because building it
based on permissions is tricky.

Anyway, if you're running slow now, backup your database, note your
current rev number (svn info), and then svn up and see if there's an
improvement.

Owen

Chris J. Davis

unread,
Jan 29, 2009, 12:45:51 AM1/29/09
to habar...@googlegroups.com
Very nice, the update fixed the slowness for me.

Thanks Owen!

Stanley FONG

unread,
Jan 29, 2009, 7:33:50 AM1/29/09
to habar...@googlegroups.com
It cured my slowness too but my site took far too long to render home page, i.e. mysite.com/page/1, don't know why.

mysqld is cranking less than 5% now which is normal.

Stanley FONG

unread,
Jan 29, 2009, 7:45:53 AM1/29/09
to habar...@googlegroups.com
[edited] logged out of admin, home page or /page/1 works OK.
Reply all
Reply to author
Forward
0 new messages