---
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.

## :fa-table: At a Glance {#at-a-glance}

| 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 | :Nodinite: 3.0 |

## :fa-gears: 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.

> [!WARNING]
> An invalid value, or `0`, 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.

## :fa-lightbulb: 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.

## :fa-hand-point-right: Next Steps

* :fa-hard-drive: [Logging Service][]  
* :fa-pen-to-square: [Manage System Parameters][]  

## :fa-link-horizontal: Related Topics

* :fa-arrow-alt-to-top: [MessageProcessingMaxBodySize][]  
* :fa-timer: [MessageProcessingTimerInterval][]  
* :fa-database: [Log Databases][]  
* :fa-cog: [System Parameters][]  

[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Logging Service - Message Processing]:{ndr}/Core%20Services/Logging%20Service/Overview.md#message-processing
[Manage System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Manage%20System%20Parameters.md
[MessageProcessingMaxBodySize]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/MessageProcessingMaxBodySize.md
[MessageProcessingTimerInterval]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/MessageProcessingTimerInterval.md
[System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Overview.md