Skip to content

memory sharing via gunicorn workers? #2599

Answered by parano
ebbunnim asked this question in Q&A
Discussion options

You must be logged in to vote

About memory sharing between unicorn workers with --preload option, in general we do not recommend this approach. it is not really memory sharing, but simply preload the model in python before forking the process. It may work in some cases, but it is tightly coupled with the extension implementation and may not be the most efficient way of accessing a shared model (as @bojiang explained above).

I'd recommend go with 1.0 release. The runner design in bentoml 1.0 is going to solve the "memory sharing" issue you were looking for and avoid the OOM issue.

There is currently an issue regarding transformer custom pipeline, we are working on a fix. see #2534

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ebbunnim
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants