RAM Usage
See original GitHub issueHi, I noticed that TorchServe takes up a lot of RAM. This is unexpected, especially as the models run on GPU and take up space there too. In my particular case, I have 2 GPUs and 3 models for a particular inference chain, and nvidia-smi shows that the 3 models x 2 GPUs take approximately 6 GB on the GPUs (i.e. ~ 1 GB per model per GPU). At the same time, htop shows that they are also occupying ~ 12 GB of RAM in total. This should be close to zero as far as I understand. Can anyone please help me understand / resolve this issue?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:13
 Top Results From Across the Web
Top Results From Across the Web
11 ways to decrease RAM usage and speed up your computer
11 ways to reduce your RAM usage · Turn your device off and on · Check which programs are draining your RAM ·...
Read more >How to Free Up RAM and Reduce RAM Usage on Windows
1. Restart Your PC · 2. Check RAM Usage With Windows Tools · 3. Uninstall or Disable Unneeded Software · 4. Update Your...
Read more >10+ Ways to Free up RAM On Your Windows or Mac Device
5 Ways to Free up RAM on Mac · 1. Fix the Finder (Close Finder Windows Too) · 2. Check Activity Monitor ·...
Read more >How to Check RAM on Windows 10 - Crucial.com
One way to check RAM on Windows 10 and find out your usage is via the “Windows Task Manager.” To consult the Windows...
Read more >Reducing RAM usage - Untangle Support
Reducing RAM usage · Disable and uninstall memory-intensive applications. · Uninstall disabled applications. · Uninstall applications that are running but have no ...
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

Hi does anyone still having this problem?
I have 7 models and serving with the TorchServe. If I load all of them to CPU, in total they consume around 3 gb of RAM. But if I load on GPU, they are using excess amount of the RAM. Only one model consumes around 3gb RAM and If I load all on the GPU they take around 18-20gb. Another interesting thing is that after making an inference, used RAM increases dramatically and stays there. Here is the story:
Maybe I am doing something wrong with the configurations. I can provide more details.
Here is my config file inference_address=http://0.0.0.0:8080 management_address=http://0.0.0.0:8081 metrics_address=http://0.0.0.0:8082 model_store=/home/model-server/model-store install_py_dep_per_model=false load_models=model1,model2,model3,…,model7 default_workers_per_model=1
Ps. I am using torchserve version 0.4.2 but I tried with the 0.5.2 and it was still same.
Thank you for the help!
this is fixed in v0.4.0