---
title: MessageProcessingBatchSize System Parameter - Logging Service Batch Size
description: MessageProcessingBatchSize sets how many Log Events the Nodinite Logging Service fetches per batch. Default 100; it mainly controls how much message data is held in memory at once.
---

# MessageProcessingBatchSize - System Parameter

The **MessageProcessingBatchSize** [System Parameter][System Parameters] sets how many [Log Events][Log Event] the [Logging Service][] fetches from a [Log Database][Log Databases] in each batch when it processes messages. It mainly controls how much message data the Logging Service holds in memory at once.

<h2 id="at-a-glance"><i class="fal fa-table" aria-hidden="true"></i> At a Glance</h2>

| Property | Value |
| --- | --- |
| Key | `MessageProcessingBatchSize` |
| Data type | integer (number of Log Events per batch) |
| Default | `100` |
| Read by | [Logging Service][] |
| Takes effect | On the next processing run; no restart needed |
| Status | ✅ Active |
| Since | <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 3.0 |

## <i class="fal fa-gears" aria-hidden="true"></i> How It Works

One message processing run fetches batches of up to **MessageProcessingBatchSize** Log Events until the backlog is empty, and processes each batch with at most 25 threads. The batch size therefore decides how much message data, payload and context, the Logging Service keeps in RAM at the same time; it has little effect on throughput. How often a run starts is fixed, see [MessageProcessingTimerInterval][]. The full processing pipeline is described in [Message Processing][Logging Service - Message Processing] on the Logging Service page.

<aside aria-label="Warning" class="nodinite-note nodinite-note--warning">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-triangle-exclamation"></i> Warning</p>
<div class="nodinite-note__content"><p>An invalid value, or <code>0</code>, is only written to the Logging Service log. The Logging Service then processes nothing, and unprocessed Log Events pile up in the Log Database until you correct the value.</p></div>
</aside>

## <i class="fal fa-lightbulb" aria-hidden="true"></i> Choosing a Value

* ✅ Keep the default `100`. There is no minimum or maximum, but bigger batches are not much faster.
* Raise the value only when your messages are small. With large messages, batch size × message size decides the memory use of the Logging Service, so a high value can exhaust RAM on the server.
* To protect the Logging Service from single very large messages, set [MessageProcessingMaxBodySize][] instead.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-hard-drive" aria-hidden="true"></i> [Logging Service][]  
* <i class="fal fa-pen-to-square" aria-hidden="true"></i> [Manage System Parameters][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-arrow-alt-to-top" aria-hidden="true"></i> [MessageProcessingMaxBodySize][]  
* <i class="fal fa-timer" aria-hidden="true"></i> [MessageProcessingTimerInterval][]  
* <i class="fal fa-database" aria-hidden="true"></i> [Log Databases][]  
* <i class="fal fa-cog" aria-hidden="true"></i> [System Parameters][]  

[Log Databases]:https://docs.nodinite.com/core-services/log-databases/overview/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Logging Service]:https://docs.nodinite.com/core-services/logging-service/overview/
[Logging Service - Message Processing]:https://docs.nodinite.com/core-services/logging-service/overview/#message-processing
[Manage System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/manage-system-parameters/
[MessageProcessingMaxBodySize]:https://docs.nodinite.com/administration/settings/system-parameters/messageprocessingmaxbodysize/
[MessageProcessingTimerInterval]:https://docs.nodinite.com/administration/settings/system-parameters/messageprocessingtimerinterval/
[System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/overview/