Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master service rates drop the longer it runs #9

Closed
cloudshao opened this issue Dec 13, 2010 · 1 comment
Closed

Master service rates drop the longer it runs #9

cloudshao opened this issue Dec 13, 2010 · 1 comment

Comments

@cloudshao
Copy link
Owner

When a server is started, it seems to go at a rate of about 5000 requests serviced per hour. After the first two hours, the rate seems to go down drastically. This is the rate history output from Dec 13 (from typing 'rate'):

rates:
(5436, 5089)
(5458, 5447)
(911, 740)
(669, 508)
(648, 497)
(518, 350)
(506, 366)
(306, 279)
connections, responses this hour: 719, 411

This might be due to "error: can't start new thread" that doesn't seem to happen when we first start the server, but appears sometime later.

@cloudshao
Copy link
Owner Author

After more investigation this was due to disk writes to the database taking longer and longer as the database grew. As disk writes fell behind, workers were being blocked waiting for writes to finish, resulting in hundreds of threads waiting. We implemented producer-consumer pattern where workers are never blocked and as a result, number of threads do not get out of control. Rates are steady when not trying to run in full-tilt mode.

Closing.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant