-
Notifications
You must be signed in to change notification settings - Fork 152
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
New server performance fixes #368
Open
fstachura
wants to merge
9
commits into
master
Choose a base branch
from
prod
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+43
−9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmarks tell us throughput increases linearly with processes count. Signed-off-by: Théo Lebrun <[email protected]>
Signed-off-by: Théo Lebrun <[email protected]>
Before, we copied all source files at the start of the Dockerfile; that meant we always rebuilt most steps. Only copy requirements.txt first, then copy the rest after many steps. Signed-off-by: Théo Lebrun <[email protected]>
Signed-off-by: Théo Lebrun <[email protected]>
This behavior isn't used at the moment, but is much more sensible that the past that was to give None to whatever content-type lambda we had (eg DefList that would call split on the None). Signed-off-by: Théo Lebrun <[email protected]>
Lookup if a definition exists is taking too long to render source code. Generate small databases that only tell us if a definition exists for a given family. Because the database is much smaller, it is faster to query. Many URLs could only be queried at 12 req/s. With that patch, I can do >80 req/s on the same URLs, with the same config. We generate the caches from update.py. We also add an edge-case to generate the files (if they don't exist) even if no new tag exists. Signed-off-by: Théo Lebrun <[email protected]>
Apparently we might need this for some C code extensions: > Forcing a WSGI application to run within the first interpreter can be > necessary when a third party C extension module for Python has used > the simplified threading API for manipulation of the Python GIL and > thus will not run correctly within any additional sub interpreters > created by Python. https://www.modwsgi.org/en/latest/configuration-directives/WSGIApplicationGroup.html Signed-off-by: Théo Lebrun <[email protected]>
Signed-off-by: Théo Lebrun <[email protected]>
fstachura
commented
Dec 25, 2024
@@ -189,6 +189,15 @@ def update_versions(self, tag): | |||
db.vers.put(tag, obj, sync=True) | |||
|
|||
|
|||
def generate_defs_caches(): | |||
for key in db.defs.get_keys(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How long does this take for linux?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty slow (on my workstation):
⟩ echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null
⟩ command time python -c "
import berkeleydb ;
db = berkeleydb.db.DB() ;
db.open('../elixir-data/linux/data/definitions.db', flags=berkeleydb.db.DB_RDONLY) ;
db.keys()"
5.21user 8.20system 0:43.29elapsed 30%CPU (0avgtext+0avgdata 455720maxresident)k
8610048inputs+0outputs (40major+103071minor)pagefaults 0swaps
⟩ command time python -c "
import berkeleydb ;
db = berkeleydb.db.DB() ;
db.open('../elixir-data/linux/data/definitions.db', flags=berkeleydb.db.DB_RDONLY) ;
db.keys()"
1.29user 0.84system 0:02.15elapsed 99%CPU (0avgtext+0avgdata 457048maxresident)k
0inputs+0outputs (0major+103090minor)pagefaults 0swaps
Signed-off-by: Théo Lebrun <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.