> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/guide/notebook-view/blocks/compute-settings/setting-compute-type.md).

# Setting Compute Type

## Comput modes

There are two types of compute modes in Zerve

* **Serverless** - This is the default setting. This is slower as executors would spin up when code run starts and stop once code run finishes.&#x20;
* **Persistent** - Uses a persistent execution infrastructure rather than short-lived environments like Lambda invocations. This takes around a minute to start, but execution is faster.

## Serverless mode - Set default compute

When you create a new block, by default the compute type is Lambda. You can change this in "Compute Setting" on the left side as shown in the picture below.&#x20;

<figure><img src="/files/GwVpzOJHj9uNYXxPnrpe" alt=""><figcaption></figcaption></figure>

## Persistent mode - Setup

In Persistent mode, you only have an option to select Fargate compute. You can select different instance type as per your requirement. It takes about a minute to start which and the status can be seen in the tool bar in the bottom .Following video shows how this can be started and where to monitor it's status. You will see that block run will be much quicker once persistent is selected.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FZPmAtc5NI40NVOJe6ao1%2FPersistent.mp4?alt=media&token=7df65feb-daad-49fa-84cd-a7dba89da22a>" %}

## Set block level compute - Serverless and Persistent

In both Serverless and Persistent compute modes, you can set different compute type for different blocks in Zerve. This allows you to use cheaper Lambda for smaller operations and comparitively expensive CPU/GPU only in places you need them.

The following video shows you can set block level compute

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FZpcTZIQmR9Kt4qcRi1q0%2FCompute%20Settings.mp4?alt=media&token=53164917-5953-46e2-ae97-ec1f53fc2b0e>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zerve.ai/guide/notebook-view/blocks/compute-settings/setting-compute-type.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
