Bobcares

Dovecot vsz_limit

by | Apr 25, 2022

Willing to know more about Dovecot vsz_limit? We can help you.

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.

Let’s take a look at how our Support Team help a customer  deal with this query.

Dovecot vsz_limit

Basically, these are simply safe guards against potential memory leaks.

If the process’s virtual size reaches the limit, the process is kill by the kernel.

It Limit the process’s address space.

When the space reachs, some memory allocations may start failing with “Out of memory”, or the kernel may kill the process with signal 9.

This setting is mainly intended to prevent memory leaks from eating up all of the memory, but there can also legitimate reasons why the process reaches this limit.

There are 3 types of services that need to optimization in different ways is explained by our Support Techs :

  • Firstly, master services:

Currently there isn’t any easy way to optimize these.

If these become a bottleneck, typically you need to run another Dovecot server.

In some cases it may possible to create multiple master processes and have each one responsible for only specific users/processes, although this may also require some extra development.

  • Secondly, Services that do disk I/O or other blocking operations:

These should have client_limit=1, because any blocking operation will block all the other clients and cause unnecessary delays and even timeouts.

This means that process_limit specifies the maximum number of available parallel connections.

  • Services that have no blocking operations:

For best performance, these should have process_limit and process_min_avail set to the number of CPU cores, so each CPU will busy serving the process but without unnecessary context switches.

Then, client_limit needs to set high enough to able to serve all the connections (max connections=process_limit * client_limit).

service_count is commonly set to unlimited (0) for these services.

Otherwise when the service_count is beginning to reach, the total number of available connections will shrink.

With very bad luck that could mean that all the processes are simply waiting for the existing connections to die away before the process can die and a new one can create.

Although this could made less likely by setting process_limit higher than process_min_avail, but that’s still not a guarantee since each process could get a very long running connection and the process_limit would eventually reach.

[Need a solution to another query? We are just a click away.]

Conclusion

Today, we discussed about the services explained by our Support Engineers for Dovecot vsz_limit

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.