title: Why number of systemctl tasks more then number of process threads
body: <p>I have my multithread application running under systemd service.
  When it runs without workload number of threads in <code>/proc/&lt;Main PID&gt;/status</code> and in output of systemctl are same</p>
  
  <p><code>systemctl show -p TasksCurrent &lt;ServiceName&gt;
    TasksCurrent=287
  cat /proc/&lt;Main PID&gt;/status | grep Threads
    Threads:        287</code></p>
  
  <p>In some cases when workload increases, number of <code>Threads</code> in <code>/proc/&lt;pid&gt;/status</code> varies from <code>287</code> to <code>295</code>(it is normal, additional threads are created during workflow) but number of <code>TasksCurrent</code> in <code>systemctl</code> output constantly varies from <code>~500</code> to <code>~3000</code></p>
  
  <p>Service has only one process in CGroup but also it has some other services in dependencies like <code>Requires</code>, <code>Wants</code> and <code>BindsTo</code>. All of those services has <em><strong>constant</strong></em> number of <code>TasksCurrent</code>, for one of them it is <code>~3500</code>(and it equals to number of threads in it's processes), for all others it is <code>1</code></p>
  
  <p><strong>Question:</strong>
  Why number of service's tasks is not equal to number of threads in this service's only process?</p>