Couchdb - 100% CPU Utilization

I used Couchdb to create a private NPM mirror, but I found that beam.smp kept my CPU usage up to 100%, is there any way to reduce it, like 50%?

Thank you very much.

+6
source share
1 answer

You cannot directly limit the CPU / memory usage for CouchDB, but you can configure the Replicator settings to reduce their usage. Options that interest you:

  • http_connections Specifies the maximum number of HTTP connections for each replication. Saving them reduces transmission bandwidth.

     [replicator] http_connections = 20 
  • worker_batch_size At lower batch sizes, breakpoints are performed more frequently. Lower batch sizes also reduce the total amount of RAM used.

     [replicator] worker_batch_size = 500 
  • worker_processes
    The number of replication workers. Saving them reduces the amount of data replication processed => reduces CPU usage due to less data to process.

     [replicator] worker_processes = 4 

Play with these options to find the right combination to suit your limits.

+2
source

Source: https://habr.com/ru/post/953307/


All Articles