It was a small RP community. They had gotten a post up to 1400 comments, which is really nothing, but they were arranged in a chain. Reply, reply, reply, reply. So instead of the normal view of things -- a wide tree -- we had a very, very deep tree.
The part of the code that checks to see if you are subscribed to a thread walks the tree from where you are up to the top to see if you're subscribed to any comment in the chain. Normally, this is simple -- you walk a few comments up and you're at the root and you're done.
In this case, it had to walk 1400 comments. The code was done in such a way that it had to do this frequently, and it caused an explosion of work on Apache, taking tons of memory and CPU. Ouch.
fu fixed it temporarily with some better caching to make sure we don't have to recompute things we already know. We may come up with a better way to do it, but it works for now.
Aaaaaaaanyway. I know I didn't break that down into plate analogies, but I have to run. Maybe someone else can, if needed, and if not, I'll do it later if I remember. ^^;
no subject
It was a small RP community. They had gotten a post up to 1400 comments, which is really nothing, but they were arranged in a chain. Reply, reply, reply, reply. So instead of the normal view of things -- a wide tree -- we had a very, very deep tree.
The part of the code that checks to see if you are subscribed to a thread walks the tree from where you are up to the top to see if you're subscribed to any comment in the chain. Normally, this is simple -- you walk a few comments up and you're at the root and you're done.
In this case, it had to walk 1400 comments. The code was done in such a way that it had to do this frequently, and it caused an explosion of work on Apache, taking tons of memory and CPU. Ouch.
Aaaaaaaanyway. I know I didn't break that down into plate analogies, but I have to run. Maybe someone else can, if needed, and if not, I'll do it later if I remember. ^^;