# HAProxy CPU Usage when all backend servers are in MAINT state with check directive

**URL:** <https://discourse.haproxy.org/t/haproxy-cpu-usage-when-all-backend-servers-are-in-maint-state-with-check-directive/4760>\
**Category:** Help!\
**Created:** [January 23, 2020, 8:53am UTC](https://discourse.haproxy.org/t/haproxy-cpu-usage-when-all-backend-servers-are-in-maint-state-with-check-directive/4760 "2020-01-23T08:53:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bokseniu](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@bokseniu](https://discourse.haproxy.org/u/bokseniu)\
**Post date:** [January 23, 2020, 8:53am UTC](https://discourse.haproxy.org/t/haproxy-cpu-usage-when-all-backend-servers-are-in-maint-state-with-check-directive/4760/1 "2020-01-23T08:53:20Z")

</div>

Hi folks!

I’ve noticed the weird HAProxy 2.0 (2.0.12) behavour when it is started with all backend servers disabled (MAINT state). Weirdness is that when the servers are configured with **check** directive HAProxy starts to consume additional CPU cycles (when compared to the same configuration with **no-check** directive). It becomes more visible when HAProxy is started with high number of threads.

For example, on a 2CPU VM and 100 backend servers in a MAINT state HAProxy started with 62 threads consumes around 20% of CPU (that’s with no load). With the same config but **no-check** in it CPU usage is around 1%.

Can this be fixed?

Example config:

```
global
   nbthread 62
   log stdout local0 warning
   stats socket /var/run/haproxy.sock mode 666 level admin
   stats timeout 2m

defaults
    log global
    mode http
    option http-use-htx
    timeout connect 5s
    timeout client 1h
    timeout server 1h

listen grpc
    bind 127.0.0.1:50051 proto h2
    option httplog
    balance roundrobin
    default-server proto h2 check inter 1s fall 1 rise 1 disabled
    #default-server proto h2 no-check inter 1s fall 1 rise 1 disabled
    server-template srv 1-100 10.0.0.1:50051
```
