-
Notifications
You must be signed in to change notification settings - Fork 612
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
Benchmark and optimization of nerdctl images
#809
Comments
I think nerdctl image -a or -o wide should show blobsize,at default it is not necessary to show it. |
benchmark Only
Only
Both :
the difference between the 3 average is negligible I think It is useless to make a |
Thanks, but we need to benchmark with more than 100 images, I guess |
@AkihiroSuda I agree. But 100 is a huge number. Do you have a suggestion to get this number of image in one environnement 😅 |
I pulled a list of images from some of most pulled using docker hub API:
some of them are DEPRECATED (i.e SCRATCH). So in total, I have 96 images in my environment. **Click to toggle full list of images**REPOSITORY TAG IMAGE ID CREATED PLATFORM SIZE BLOB SIZE
jenkins/jenkins latest 1f6e7ef75a54 19 minutes ago linux/amd64 469.7 MiB 276.3 MiB
aerospike latest ffcb005eae9f 8 hours ago linux/amd64 228.9 MiB 80.0 MiB
alpine 3.13 ccf92aa53bc6 8 days ago linux/amd64 6.0 MiB 2.7 MiB
alpine latest 7580ece7963b 8 hours ago linux/amd64 5.9 MiB 2.7 MiB
arangodb latest ff91fb0eb65e 8 hours ago linux/amd64 486.5 MiB 190.1 MiB
bonita latest 1b28c73bbcde 34 minutes ago linux/amd64 301.5 MiB 172.0 MiB
buildpack-deps latest 4cbb6d56f192 9 hours ago linux/amd64 858.2 MiB 307.5 MiB
busybox latest 3614ca5eacf0 9 days ago linux/amd64 1.3 MiB 759.3 KiB
cassandra latest d0ff1c79b5b3 8 hours ago linux/amd64 347.6 MiB 144.0 MiB
celery latest 5c236059192a 8 hours ago linux/amd64 236.2 MiB 79.8 MiB
centos latest a27fd8080b51 9 hours ago linux/amd64 244.4 MiB 79.7 MiB
cirros latest be6f5d1ab1e4 9 hours ago linux/amd64 12.9 MiB 5.7 MiB
clojure latest 3e1b7351b5e3 8 hours ago linux/amd64 682.3 MiB 357.4 MiB
couchbase latest 066a96ee394b 8 hours ago linux/amd64 1.3 GiB 569.0 MiB
couchdb latest c4248560069d 30 minutes ago linux/amd64 210.8 MiB 83.4 MiB
crate latest 3da3f761952d 8 hours ago linux/amd64 844.1 MiB 353.0 MiB
crux latest afcc4566ea59 9 hours ago linux/amd64 467.9 MiB 152.2 MiB
debian latest 2ce44bbc00a7 9 hours ago linux/amd64 134.6 MiB 52.5 MiB
django latest 5bfd3f442952 8 hours ago linux/amd64 471.6 MiB 150.7 MiB
docker latest 75290344f118 39 minutes ago linux/amd64 281.6 MiB 89.8 MiB
drupal latest af84be385b9c 8 hours ago linux/amd64 635.3 MiB 180.1 MiB
elixir latest e6d51468938b 28 minutes ago linux/amd64 1.5 GiB 541.7 MiB
erlang latest e666e8cdb838 15 minutes ago linux/amd64 1.5 GiB 536.9 MiB
fedora latest cbf627299e32 9 hours ago linux/amd64 174.2 MiB 56.2 MiB
gazebo latest 8f904171395e 8 hours ago linux/amd64 2.0 GiB 581.9 MiB
gcc latest ef7e8180a14e 8 hours ago linux/amd64 1.3 GiB 439.4 MiB
ghost latest 90449eb5646c 8 hours ago linux/amd64 648.9 MiB 140.4 MiB
glassfish latest 9fb82b929fb6 8 hours ago linux/amd64 0.0 B 334.4 MiB
golang latest 9349ed889adb 8 hours ago linux/amd64 1000.0 MiB 337.0 MiB
haproxy latest 1e0bf13d9ee8 8 hours ago linux/amd64 108.3 MiB 37.5 MiB
haskell latest 7f83b45cc80d 8 hours ago linux/amd64 2.7 GiB 650.7 MiB
hello-world latest 53f1bbee2f52 8 hours ago linux/amd64 20.0 KiB 6.9 KiB
hipache latest 6d20ee9ddd59 9 hours ago linux/amd64 0.0 B 146.8 MiB
httpd latest 75d370e19ec2 8 hours ago linux/amd64 152.4 MiB 54.4 MiB
hylang latest 0d3b6c28cb72 8 hours ago linux/amd64 148.1 MiB 48.9 MiB
iojs latest e9c867712191 8 hours ago linux/amd64 683.2 MiB 242.3 MiB
irssi latest 3b638c10509b 8 hours ago linux/amd64 186.7 MiB 49.0 MiB
java latest c1ff613e8ba2 8 hours ago linux/amd64 662.7 MiB 232.1 MiB
jetty latest 3e5d818cb467 8 hours ago linux/amd64 475.0 MiB 244.6 MiB
joomla latest 896a4b95d050 8 hours ago linux/amd64 664.1 MiB 208.5 MiB
jruby latest 8157c7a110d5 8 hours ago linux/amd64 308.1 MiB 116.5 MiB
julia latest be7fa12413d4 8 hours ago linux/amd64 520.0 MiB 158.5 MiB
kaazing-gateway latest 2f308cf25e6d 8 hours ago linux/amd64 302.3 MiB 128.8 MiB
lightstreamer latest 99327f2f64e2 27 minutes ago linux/amd64 722.5 MiB 367.0 MiB
mageia latest ee8deeb5ab22 8 hours ago linux/amd64 324.4 MiB 105.4 MiB
mariadb latest 88fcb7d92c7f 8 hours ago linux/amd64 388.4 MiB 118.1 MiB
maven latest d3b22b3d0904 8 hours ago linux/amd64 534.6 MiB 257.6 MiB
memcached latest 126afa4dc280 8 hours ago linux/amd64 96.4 MiB 31.4 MiB
mongo latest 82302b063607 8 hours ago linux/amd64 683.8 MiB 237.3 MiB
mono latest 705350895cae 8 hours ago linux/amd64 788.2 MiB 242.6 MiB
mysql latest 152cf187a3ef 9 hours ago linux/amd64 455.5 MiB 125.7 MiB
nats latest 4ee342fdd229 43 minutes ago linux/amd64 11.4 MiB 4.4 MiB
neo4j latest 8ba4306cccb0 33 minutes ago linux/amd64 544.2 MiB 343.6 MiB
neurodebian latest 5bb987b78bd3 8 hours ago linux/amd64 156.1 MiB 63.5 MiB
nginx 1.19-alpine 07ab71a2c8e4 8 days ago linux/amd64 25.7 MiB 9.4 MiB
nginx latest 1761fb5661e4 9 hours ago linux/amd64 149.1 MiB 54.1 MiB
node latest c9504e6bdd04 9 hours ago linux/amd64 1.0 GiB 353.3 MiB
nuxeo latest 28de083ab4dc 31 minutes ago linux/amd64 1.8 GiB 911.8 MiB
odoo latest 485464c5a716 8 hours ago linux/amd64 1.6 GiB 530.4 MiB
orientdb latest 78fe0f955ad8 26 minutes ago linux/amd64 395.6 MiB 203.9 MiB
owncloud latest 173811cb4c40 8 hours ago linux/amd64 655.7 MiB 210.9 MiB
percona latest 8e77cd4bdbed 8 hours ago linux/amd64 662.8 MiB 235.2 MiB
perl latest 093c0d91185d 8 hours ago linux/amd64 920.8 MiB 322.0 MiB
photon latest 1db94cc46388 30 minutes ago linux/amd64 36.8 MiB 15.3 MiB
php-zendserver latest 487845576d84 8 hours ago linux/amd64 1.0 GiB 375.3 MiB
php latest fd48f3c38643 8 hours ago linux/amd64 488.3 MiB 161.2 MiB
piwik latest f7b6e52f7934 29 minutes ago linux/amd64 481.2 MiB 159.2 MiB
postgres latest 3e2eba0a6efb 9 hours ago linux/amd64 383.4 MiB 131.4 MiB
pypy latest cf7c9b5a5c17 8 hours ago linux/amd64 995.3 MiB 342.7 MiB
python latest ce21f64c4c3a 8 hours ago linux/amd64 946.2 MiB 335.0 MiB
r-base latest 3cd83a271bac 8 hours ago linux/amd64 793.8 MiB 324.6 MiB
rabbitmq latest 68cf8d3329e0 8 hours ago linux/amd64 237.4 MiB 95.2 MiB
rails latest aec52fe81ff0 8 hours ago linux/amd64 878.9 MiB 303.1 MiB
rakudo-star latest 4812508caf81 8 hours ago linux/amd64 477.3 MiB 154.4 MiB
redis alpine3.13 6833ca04ec87 2 weeks ago linux/amd64 33.8 MiB 10.4 MiB
redis latest ed8cba11c094 9 hours ago linux/amd64 122.7 MiB 40.4 MiB
redmine latest eff62a11e469 8 hours ago linux/amd64 637.9 MiB 226.1 MiB
registry latest c631a581c615 9 hours ago linux/amd64 24.5 MiB 8.8 MiB
rethinkdb latest 3525b9b8277f 8 hours ago linux/amd64 129.0 MiB 45.7 MiB
rocket.chat latest 532082b9156c 41 minutes ago linux/amd64 1.3 GiB 262.8 MiB
ros latest 89a1c3b529c4 8 hours ago linux/amd64 815.9 MiB 250.5 MiB
ruby latest db317226be7a 8 hours ago linux/amd64 921.4 MiB 338.4 MiB
sentry latest 5a9fb82278c8 8 hours ago linux/amd64 912.9 MiB 251.6 MiB
solr latest 08fff33aefac 34 minutes ago linux/amd64 534.3 MiB 308.7 MiB
sonarqube latest b89044d191da 8 hours ago linux/amd64 513.4 MiB 349.5 MiB
sourcemage latest f39c8eeadfc8 35 minutes ago linux/amd64 938.4 MiB 251.0 MiB
swarm latest 2de8883e2933 8 hours ago linux/amd64 12.2 MiB 3.7 MiB
thrift latest c05261d526cd 8 hours ago linux/amd64 126.9 MiB 41.7 MiB
tomcat latest 9edc5c51c2de 8 hours ago linux/amd64 479.1 MiB 243.7 MiB
tomee latest 90b08fdfab43 38 minutes ago linux/amd64 367.8 MiB 162.9 MiB
ubuntu-debootstrap latest e74053a4261a 8 hours ago linux/amd64 101.2 MiB 33.3 MiB
ubuntu-upstart latest 780f166fa5f9 9 hours ago linux/amd64 282.4 MiB 97.0 MiB
ubuntu latest b6b83d3c3317 9 hours ago linux/amd64 83.4 MiB 29.0 MiB
websphere-liberty latest 6ec97f5e5029 8 hours ago linux/amd64 701.8 MiB 441.0 MiB
wordpress latest 999392cfea3c 9 hours ago linux/amd64 624.8 MiB 204.7 MiB I did @fahedouch experiment: BOTH
Without
Without
Without both ( comment both)
seems nerdctl version >= 0.22.0 |
Reviving this issue, and sharing notes here: I was working on adding caching to the snapshotter for commands like Our current implementation of Then, for each image, we call
Then, for each image and each architecture, we call on
Then we call Then we call Then we call That is a lot of duplicate filesystem calls. A quick auditd test confirms the above and reports about 60 filesystem hits for Alpine here (alpine contains one layer and 8 architectures). Suggestion:
That should bring down the number of filesystem access significantly. Here are some highly not scientific numbers against main and against my current work in progress: For 500 identical, single platform images (tagged from
For 500 identical, multi platform images (all tagged from
For 500 identical, multi truly platform images (all tagged from
Using the image list from above, with code instrumentation, printImage execution time gets divided by 3 (from about 1 second to 0.3 second), although The PR is not ready to be merged and more a proof of concept, but would like to know what you folks think. Cheers. |
On today's main (873a087), with the list of images provided above (84 images currently), on a lima setup / M1 Max:
|
Originally posted by @AkihiroSuda in #789 (comment)
The text was updated successfully, but these errors were encountered: