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

Mount files db in RAM #484

Open
splakhonin opened this issue Mar 12, 2024 · 1 comment
Open

Mount files db in RAM #484

splakhonin opened this issue Mar 12, 2024 · 1 comment
Labels
improvement Improvement or new feature

Comments

@splakhonin
Copy link

Based on the following documentation it's cool to add the possibility to map database files into RAM.
https://docs.gitlab.com/runner/executors/docker.html#mount-a-directory-in-ram

`[runners.docker]

For the main container

[runners.docker.tmpfs]
"/var/lib/mysql" = "rw,noexec"

For services

[runners.docker.services_tmpfs]
"/var/lib/mysql" = "rw,noexec"`

As docker/sdk generates a docker-compose.yml, here we have a volume or tmpfs mount definition, https://docs.docker.com/compose/compose-file/compose-file-v3/#long-syntax-3

The idea is to add a configuration to switch on/off mounting map database files into RAM.

@alexanderM91 alexanderM91 added the improvement Improvement or new feature label Apr 11, 2024
@alexanderM91
Copy link
Collaborator

Subject: Update on Performance Testing with tmpfs Mounts

👋,

I’d like to provide a brief summary regarding the recent performance testing request.

We successfully executed the tests using tmpfs mounts.

Testing branch: test/in-mem-volume
Note: The volume type was modified for all services, not just the database.
Results:
Unfortunately, we did not observe any positive performance improvements. The CI execution time remained unchanged.

Additionally, there was no noticeable performance increase for local development either.

If I overlooked anything or if you'd like to review the results further, please feel free to let me know. I'm happy to provide additional details or assist with further checks! 😊

Additional Observations:
While tmpfs may provide performance benefits in some scenarios, I wasn’t anticipating significant improvements here, as approximately 95% of the execution time is consumed by application-specific processes (e.g., composer install, console command execution, etc.).

Looking forward to your thoughts!

Best regards,
Alex

cc: @zeetabit @splakhonin @fsmeier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement or new feature
Development

No branches or pull requests

2 participants