mint icon indicating copy to clipboard operation
mint copied to clipboard

Mint slowing down the performance

Open gautams007 opened this issue 10 months ago • 2 comments

I have successfully used mint to slim the docker images of my AI project but the inference time has almost doubled for almost all of the images without any logical explanation. The entire working of the non-slim and slim images is exactly the same, and so are the results, but the inference time has doubled.

Why is it so? Does mint add anything extra, or maybe remove something essential that is necessary for the inference of AI models. I read somewhere that the extra security might add sometime but doubling the time still doesn't make any sense. Can anyone help me with that? I didn't find any solution for this anywhere, maybe the creators themselves might be able to shed some light on the issue.

gautams007 avatar Jan 20 '25 08:01 gautams007

I'm facing the same issue.

mokshmalik5757 avatar Jan 20 '25 08:01 mokshmalik5757

I have successfully used mint to slim the docker images of my AI project but the inference time has almost doubled for almost all of the images without any logical explanation. The entire working of the non-slim and slim images is exactly the same, and so are the results, but the inference time has doubled.

Why is it so? Does mint add anything extra, or maybe remove something essential that is necessary for the inference of AI models. I read somewhere that the extra security might add sometime but doubling the time still doesn't make any sense. Can anyone help me with that? I didn't find any solution for this anywhere, maybe the creators themselves might be able to shed some light on the issue.

This is pretty interesting @gautams007 ! Can you share more about your application? Is it open source by any chance or is there an open source project or sample that looks similar to what you have?

When you run mint slim the app will run slower, but when you run the minified app it shouldn't run slower because there's nothing mint related left in the container image.

Some AI apps download model or other config data on startup and in some cases this data is cached / not redownloaded when the container runs again if it's already there (depending on how the app is designed). This caching should work as-is though and it shouldn't be impacted by minification. There's a special flag (--include-new) that also allows you to keep any downloaded or newly generated files in the container that have been detected when mint slim runs. This will allow you to save startup time for certain types of apps.

Either way, need to learn more about the app :-)

kcq avatar Jan 20 '25 17:01 kcq