# Do Sleep/Await consume resources?

**URL:** https://community.temporal.io/t/do-sleep-await-consume-resources/3991
**Category:** Community Support
**Tags:** java-sdk
**Created:** [February 15, 2022, 2:18pm UTC](https://community.temporal.io/t/do-sleep-await-consume-resources/3991 "2022-02-15T14:18:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Vikas\_NS](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/vikas_ns/32/1210_2.png) [@Vikas\_NS](https://community.temporal.io/u/Vikas_NS)
#### Post date: [February 15, 2022, 2:18pm UTC](https://community.temporal.io/t/do-sleep-await-consume-resources/3991/1 "2022-02-15T14:18:02Z")

</div>

`Workflow.sleep(123);`  
&  
`Workflow.await(123), () -> myCondition);`

- Do they consume resources (memory/cpu/thread/temporal worker)?

`Workflow.await(() -> varThatWillBeSetToTrueWhenIgetSignal);`

- Does waiting for a signal have an impact on Temporal Queues?

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [February 15, 2022, 2:25pm UTC](https://community.temporal.io/t/do-sleep-await-consume-resources/3991/2 "2022-02-15T14:25:13Z")

</div>

Sleep and await both suspend workflow execution which is later recovered (when timer fires or condition is evaluated to true). A workflow that is blocked/suspended for a long time does not consume resources on your worker(s).  
Temporal Java SDK uses real threads, and depending on your load you should look into making sure your worker configuration is configured to handle the load. See [this thread](https://community.temporal.io/t/tuning-temporal-setup-for-better-performance/539/5) for worker tuning options.

Signals are delivered to your workers via task queues, and they are recorded in workflow history.

---

<div class="post-metadata">

### Author: ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)
#### Post date: [February 15, 2022, 5:00pm UTC](https://community.temporal.io/t/do-sleep-await-consume-resources/3991/3 "2022-02-15T17:00:08Z")

</div>

Just to clarify @tihomir answer about signals.

> Does waiting for a signal have an impact on Temporal Queues?

Delivering signals creates a new workflow task that has an impact on task queues. But waiting on a signal doesn’t affect task queues at all.
