gabr42 / gabr42/OmniThreadLibrary

PostMessage related Quota error during peak machine latencies

Open
#182 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Pascal
Stars
513
Forks
147
PR merge metrics
No merged PRs in 30d

Description

- Windows 10.0.19044
- Delphi 10.4 Version 27.0.40680.4203
- OmniThreadLibrary-3.07.8
- quad Ryzen 5 1500x with 32GB ram
- Numerical application that often uses +32GB memory
- using `Parallel.ForEach( ... ).NumTasks( System.CPUCount ).Execute( ...)` api.
- problem also occurs on a 32 core 128GB ryzen machine

I've noticed that once I get above 50% physical memory and hard faults begin to happen, ERROR_NOT_ENOUGH_QUOTA is thrown inside https://github.com/gabr42/OmniThreadLibrary/blob/f74c63c36577faccab6b45b1cb83a39a9fc21b4c/OtlContainerObserver.pas#L331-L354

My working theory is that for the system to resolve the hard faults and allow the process message queues to drain the messaging process needs more sleep time, ie `CSecondSleep` needs to be longer (at least as long as a timeslice?) or `CMaxTries` needs to be bigger (which would just result in more busy waiting).

I've been able to address the issue for the moment by making `CSecondSleep = 500`. A better hack might be some form of Nagleing or a HardFault notification.

Possibly related: https://github.com/gabr42/OmniThreadLibrary/issues/63

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.