# Dedicated Server taking 10ms when flushing logs to disk. 

**URL:** <https://forums.unrealengine.com/t/dedicated-server-taking-10ms-when-flushing-logs-to-disk/2683816>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** dedicated-server, freeze, unreal-engine\
**Created:** [December 10, 2025, 3:57pm UTC](https://forums.unrealengine.com/t/dedicated-server-taking-10ms-when-flushing-logs-to-disk/2683816 "2025-12-10T15:57:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FedeOroCollider](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FedeOroCollider](https://forums.unrealengine.com/u/FedeOroCollider)\
**Post date:** [December 10, 2025, 3:57pm UTC](https://forums.unrealengine.com/t/dedicated-server-taking-10ms-when-flushing-logs-to-disk/2683816/1 "2025-12-10T15:57:33Z")

</div>

I’m getting a 10ms lock everytime dedicated servers needs to flush logs in UGameEngine::Tick.

It seems the problem is FAsyncWriter::Flush which in turn calls FAsyncWriter::FlushBuffer.

It will increment the request counter → SerializeRequestCounter.Increment();  
And then wait sleeping until the async writer thread decides to wake up and flush the log to disk here:

```
while (SerializeRequestCounter.GetValue() != 0)
{
	FPlatformProcess::SleepNoStats(0);
}

```

The thing is , async writer thread runs in FAsyncWriter::Run which which only “wakes up” every 10ms → FPlatformProcess::SleepNoStats(0.01f);

The whole time async writer is sleeping, main thread will be locked, we effectively locking main thread to 10ms every time, even though writing itself may take a few microseconds.

This is very weird, as AsyncWriter will still write logs on its own thread, without locking mainthread, so calling FAsyncWriter::Flush seems really unnecessary, at least for server logs.

Tested on UE 5.6.1-release, but it seems 5.7 made no relevant changes regarding this.

Can anyone confirm? Is it safe to just skip flushing entirely in the UGameEngine::Tick?
