> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/system-tables/sys-schema/sys-schema-views/memory_by_host_by_current_bytes-and-xmemory_by_host_by_current_bytes-views.md).

# memory\_by\_host\_by\_current\_bytes and x$memory\_by\_host\_by\_current\_bytes Views

{% hint style="info" %}
Sys Schema views are available from MariaDB 10.6.
{% endhint %}

## Description

The `memory_by_host_by_current_bytes` and `x$memory_by_host_by_current_bytes` summarize memory use grouped by host. Rows by default are sorted by descending amount of memory used.

The `memory_by_host_by_current_bytes` view is intended to be easier for human reading, while the `x$memory_by_host_by_current_bytes` view provides the data in raw form, intended for tools that process the data.

They contain the following columns:

| Column               | Description                                                                                                                                                                                       |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| host                 | Host from which the client connected. If the HOST column in the underlying Performance Schema table is NULL, rows are assumed to be for background threads, and the background host name is used. |
| current\_count\_used | Current number of allocated memory blocks that have not yet been freed for the host.                                                                                                              |
| current\_allocated   | Current number of allocated bytes that have not yet been freed for the host.                                                                                                                      |
| current\_avg\_alloc  | Current number of allocated bytes per memory block for the host.                                                                                                                                  |
| current\_max\_alloc  | Largest single current memory allocation in bytes for the host.                                                                                                                                   |
| total\_allocated     | Total memory allocation in bytes for the host.                                                                                                                                                    |

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
