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

Performance degradation after 2.7 version #1042

Closed
rainerborene opened this issue Jan 11, 2022 · 18 comments
Closed

Performance degradation after 2.7 version #1042

rainerborene opened this issue Jan 11, 2022 · 18 comments
Assignees
Labels
ruby solved stale 15 days without activity triage Triage is needed

Comments

@rainerborene
Copy link

rainerborene commented Jan 11, 2022

There is something wrong with this image. I'm still investigating the performance issue.

First lets run a simple benchmark with the ruby:2.7 image:

root@localhost:~# docker run -it --rm ruby:2.7 ruby -ve 't = Time.now; i=0;while i<100_000_000;i+=1;end; puts "#{ Time.now - t } sec"'
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
2.271846678 sec

Then compare it with bitnami/ruby:2.7-debian-10 image:

root@localhost:~# docker run -it --rm bitnami/ruby:2.7-debian-10 ruby -ve 't = Time.now; i=0;while i<100_000_000;i+=1;end; puts "#{ Time.now - t } sec"'
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
15.051291622 sec

I think this could be related to seccomp profile or misconfiguration of the base debian image. Please see these for more information:

@rafariossaa
Copy link
Contributor

rafariossaa commented Jan 12, 2022

Hi,
I am opening an internal task to look into this.
At first sight, for the info in the links provided, it seems to be related to mitigations but also can be related to the compilation flags used when compiling ruby.
Have you checked if this only happens in the latest releases ?

@rafariossaa rafariossaa added the on-hold Issues or Pull Requests with this label will never be considered stale label Jan 12, 2022
@carrodher
Copy link
Member

We are going to transfer this issue to bitnami/containers

In order to unify the approaches followed in Bitnami containers and Bitnami charts, we are moving some issues in bitnami/bitnami-docker-<container> repositories to bitnami/containers.

Please follow bitnami/containers to keep you updated about the latest bitnami images.

More information here: https://blog.bitnami.com/2022/07/new-source-of-truth-bitnami-containers.html

@carrodher carrodher transferred this issue from another repository Jul 28, 2022
@bitnami-bot bitnami-bot added the triage Triage is needed label Jul 28, 2022
@carrodher carrodher removed their assignment Jul 28, 2022
@carrodher carrodher added the ruby label Jul 28, 2022
@bitnami-bot bitnami-bot removed the triage Triage is needed label Jul 28, 2022
@carrodher carrodher removed the on-hold Issues or Pull Requests with this label will never be considered stale label Aug 4, 2022
@carrodher
Copy link
Member

Unfortunately and due to other priorities we didn't have the bandwidth to look deeper into this issue during this time and it is very likely that it will continue to be so in the near future.

@carrodher carrodher closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2022
@github-actions github-actions bot added triage Triage is needed and removed solved labels Aug 4, 2022
@carrodher carrodher removed the triage Triage is needed label Aug 5, 2022
@ouranos
Copy link

ouranos commented Nov 28, 2022

This is still happening on the latest version:

docker run -it --rm ruby:3.1.3 ruby -ve 't = Time.now; i=0;while i<100_000_000;i+=1;end; puts "#{ Time.now - t } sec"'
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux]
1.686853438 sec

docker run -it --rm bitnami/ruby:3.1.3 ruby -ve 't = Time.now; i=0;while i<100_000_000;i+=1;end; puts "#{ Time.now - t } sec"'
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux]
15.878519018 sec

This is causing our CI to crawl to a halt when upgrading from 2.6. No issues with the generic ruby image.

No issues on the latest 2.6.10 image:

docker run -it --rm ruby:2.6.10 ruby -ve 't = Time.now; i=0;while i<100_000_000;i+=1;end; puts "#{ Time.now - t } sec"'
ruby 2.6.10p210 (2022-04-12 revision 67958) [x86_64-linux]
1.889140881 sec

docker run -it --rm bitnami/ruby:2.6.10 ruby -ve 't = Time.now; i=0;while i<100_000_000;i+=1;end; puts "#{ Time.now - t } sec"'
ruby 2.6.10p210 (2022-04-12 revision 67958) [x86_64-linux]
2.020456784 sec

@rafariossaa
Copy link
Contributor

Hi,
I reproduced the issue with 3.1.3. I got better results than you, 1.4 sec for ruby and 7.1 secs for bitnami/ruby, but bad results in any case.
For 2.6.10 I got pretty similar results with ruby and bitnami/ruby, 1.4~1.6 secs.
I am bumping our internal task, but as @carrodher commented this could take a while.

@carrodher carrodher reopened this Nov 30, 2022
@github-actions github-actions bot added triage Triage is needed on-hold Issues or Pull Requests with this label will never be considered stale and removed in-progress triage Triage is needed labels Jul 11, 2023
@vfiset
Copy link

vfiset commented Jul 11, 2023

We have no other choice than abandoning Bitnami images as base for our apps because of this issue.

@github-actions github-actions bot added triage Triage is needed and removed on-hold Issues or Pull Requests with this label will never be considered stale labels Jul 11, 2023
@github-actions
Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Jul 27, 2023
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label Aug 2, 2023
@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2023
@rafariossaa
Copy link
Contributor

Hi,
Finally we could tackle this issue, it is fixed in the latest releases.
Could you take a look to it ?

$ for i in {1..5}; do docker run -it --rm bitnami/ruby:3.0.6-debian-11-r165 ruby -ve 't = Time.now; i=0;while i<100_000_000;i+=1;end; puts "#{ Time.now - t } sec"'; done 

Unable to find image 'bitnami/ruby:3.0.6-debian-11-r165' locally
3.0.6-debian-11-r165: Pulling from bitnami/ruby
9cef93724b4f: Pull complete 
Digest: sha256:305e51793f06636292991ebf75a5564aef5188e05ecc25382d8a0aa8281afe40
Status: Downloaded newer image for bitnami/ruby:3.0.6-debian-11-r165
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
2.133846896 sec
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
2.072500101 sec
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
2.097575238 sec
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
2.079146395 sec
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
2.100069047 sec
$ for i in {1..5}; do docker run -it --rm bitnami/ruby:3.1.4-debian-11-r167 ruby -ve 't = Time.now; i=0;while i<100_000_000;i+=1;end; puts "#{ Time.now - t } sec"'; done 

Unable to find image 'bitnami/ruby:3.1.4-debian-11-r167' locally
3.1.4-debian-11-r167: Pulling from bitnami/ruby
e21fedc015ba: Pull complete 
Digest: sha256:47f44c4ee722b4ab09ebadf73d87151fbf2a2f7484809c0cfecc658990bcbee6
Status: Downloaded newer image for bitnami/ruby:3.1.4-debian-11-r167
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
2.134098341 sec
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
2.143927956 sec
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
2.092869681 sec
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
2.081757178 sec
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
2.064098745 sec
$ for i in {1..5}; do docker run -it --rm bitnami/ruby:3.2.2-debian-11-r166 ruby -ve 't = Time.now; i=0;while i<100_000_000;i+=1;end; puts "#{ Time.now - t } sec"'; done 

Unable to find image 'bitnami/ruby:3.2.2-debian-11-r166' locally
3.2.2-debian-11-r166: Pulling from bitnami/ruby
94d58ddbec9e: Pull complete 
Digest: sha256:313f6a3b0b57b6f3f071ec90c84d971d85d8165ee13323089b833833f3aa6a34
Status: Downloaded newer image for bitnami/ruby:3.2.2-debian-11-r166
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
2.035457759 sec
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
2.079309355 sec
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
2.038084783 sec
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
2.043000337 sec
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
2.069768832 sec

@rafariossaa rafariossaa reopened this Sep 27, 2023
@rafariossaa rafariossaa removed stale 15 days without activity solved labels Sep 27, 2023
@github-actions
Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Oct 13, 2023
@github-actions
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby solved stale 15 days without activity triage Triage is needed
Projects
None yet
Development

No branches or pull requests

8 participants