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

num_threads and cache_max_age should be --config options #285

Closed
simonw opened this issue May 24, 2018 · 2 comments
Closed

num_threads and cache_max_age should be --config options #285

simonw opened this issue May 24, 2018 · 2 comments
Labels

Comments

@simonw
Copy link
Owner

simonw commented May 24, 2018

num_threads=3,

And

r.headers["Cache-Control"] = "max-age={}".format(365 * 24 * 60 * 60)

Refs #275

@simonw simonw added the small label May 24, 2018
simonw added a commit that referenced this issue May 26, 2018
@simonw simonw closed this as completed in 7944a8b May 27, 2018
@simonw
Copy link
Owner Author

simonw commented May 27, 2018

I ran a very rough micro-benchmark on the new num_sql_threads config option.

datasette --config num_sql_threads:1 fivethirtyeight.db

Then

ab -n 100 -c 10 'http://127.0.0.1:8011/fivethirtyeight-2628db9/twitter-ratio%2Fsenators'
Number of threads Requests/second
1 4.57
3 9.77
10 13.53
20 15.24
50 8.21

@simonw
Copy link
Owner Author

simonw commented May 27, 2018

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

No branches or pull requests

1 participant