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

New server performance fixes #368

Closed
wants to merge 7 commits into from
Closed

New server performance fixes #368

wants to merge 7 commits into from

Conversation

fstachura
Copy link
Collaborator

No description provided.

docker/gitconfig Outdated Show resolved Hide resolved
docker/000-default.conf Outdated Show resolved Hide resolved
elixir/data.py Outdated Show resolved Hide resolved
update.py Outdated
@@ -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():
Copy link
Collaborator Author

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?

Copy link
Member

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

update.py Outdated Show resolved Hide resolved
tleb added 3 commits January 29, 2025 13:27
This is pretty specific to the official server.
Here are some assumptions (probably others were forgotten):

 - Docker is available and is used to host the HTTP server on TCP/8080.

 - A symlink named /srv/elixir-data points to either /srv/elixir-data-a
   or /srv/elixir-data-b. It contains all projects. Indexing is done by
   copying the "hot" data to the "cold" location and starting a new
   container.

Signed-off-by: Théo Lebrun <[email protected]>
Signed-off-by: Théo Lebrun <[email protected]>
@tleb tleb closed this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants