nickva commented on issue #4988:
URL: https://github.com/apache/couchdb/issues/4988#issuecomment-1955460577

   I don't typically run CouchDB in docker container so this all speculative 
advice.
   
   A few things to try perhaps:
   
    * Try adjusting couchjs process numbers their number with 
https://docs.couchdb.org/en/stable/config/query-servers.html#query_server_config/os_process_limit.
 Make the hard limit say 75 and soft limit 25. The default is 100 I think.
    
    * Try lowering 
[max_dbs_open](https://docs.couchdb.org/en/stable/maintenance/performance.html#max-dbs-open).
 The default is 500 so maybe try making it 400 or 300.
    
    * When running in docker, Erlang VM doesn't always do a good job 
auto-detecting the CPU quotas so start a scheduler thread for each core on the 
host machine. So try lowering the number of schedulers artificially in 
`vm.args` with `+S 4:4`, for example to use only 4 schedulers, that could help 
with memory usage a bit as well.
   
    * Erlang VM has more advanced memory management settings. I haven't tried 
most of them. There is one to use a max amount of heap, so if you have a way to 
test it out on a test cluster first, try something like:
   vm.args
   ```
   +MMscs 4096
   +Musac false
   +MMsco true
   ```
   
   That sets the super-carrier to 4GB max. Again, I haven't tried running with 
those settings but someone reported some success with that: 
https://elixirforum.com/t/running-elixir-with-limited-heap-size/23633/13
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to