> For the complete documentation index, see [llms.txt](https://platformdocs.lattica.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platformdocs.lattica.ai/how-to-guides/resource-management/how-to-monitor-worker-performance.md).

# How-To: Monitor Worker Performance

Monitoring worker performance helps ensure optimal query processing and identifies when additional workers may be needed to maintain performance. This guide explains how to monitor worker performance for a specific model using the web console.

{% tabs %}
{% tab title="🌐Console" %}
Log in to the web console to access the **Main Page**, where modules for each of your models are displayed, and identify the module corresponding to the model for which you want to monitor a worker's performance.

<figure><img src="/files/xQfbNcCopxbzwKMaDNlN" alt=""><figcaption><p>Worker Performance</p></figcaption></figure>

The model's performance metrics are displayed below its name:

1. **Current Load**: Shows the average query processing time in the last 5 minutes.
2. **Average Load**: Indicates the model's average query processing time over the past month.
3. **Active Workers**: Lists the number of workers currently running for the model.
   {% endtab %}

{% tab title="🧊 Python SDK" %}

```python
import lattica_common.auth_local_state as auth
import lattica_common.app_api as agent_app

# Notice your account token expires every 30 days and it's up to you to renew it
auth.set_session_token("your_account_token_you_got_in_your_email")

# Retrieve all active workers for a specific model
active_workers = agent_app.worker.get_active_workers("model_id")

# Iterate through each active worker and get detailed worker information
for active_worker in active_workers:
    # Retrieve worker information using the workerSessionId
    worker_session_id = active_worker.workerSessionId

    # In case of failur this function throws
    worker_info = agent_app.worker.get_worker_info(worker_session_id)
    
    # Print or process the worker information as needed
    print(f"Worker Session ID: {worker_session_id}")
    print(f"Worker Info: {worker_info}\n")

```

{% endtab %}
{% endtabs %}

***

### **Compare Current Load and Average Load**

If the **Current Load** is significantly higher than the **Average Load**, it indicates increased query traffic or reduced performance. In this case, consider starting additional workers to distribute the load.

***
