Repository navigation
Description
Platform
Windows
Flock version
1.0.0-beta.15
OS version
Windows 11 25H2 (26200)
What happened?
On Windows every request is about 2× slower than it should be. flockd runs from the "Flock Daemon" scheduled task without a window, so Windows treats the php-cgi workers as background work and puts them under EcoQoS (efficiency cores, low clock). On a hybrid CPU that's a big hit.
Laravel 13 + Filament 5 app, GET /up, sent straight to the workers over FastCGI, alternating requests so both see the same machine state:
| worker | /up median |
|---|---|
| Flock worker as started | ~300 ms |
| same worker after opting it out of power throttling | ~147 ms |
| same php-cgi + same php.ini started from a terminal | ~132 ms |
Priority, I/O and memory priority, affinity and CPU sets are all normal on the workers, it's only the QoS heuristic. Users can't fix it on their side without admin (powercfg /powerthrottling disable needs elevation).
Fix: opt each child out right after start, e.g. in started() in internal/supervisor/proc_windows.go (add PROCESS_SET_INFORMATION to the OpenProcess access mask there):
// The daemon has no window, so without this Windows runs the workers as
// background work: efficiency cores, low clock.
func disableEcoQoS(p windows.Handle) {
state := struct{ Version, ControlMask, StateMask uint32 }{1, 1 /* EXECUTION_SPEED */, 0}
windows.NewLazySystemDLL("kernel32.dll").NewProc("SetProcessInformation").Call(
uintptr(p), 4 /* ProcessPowerThrottling */, uintptr(unsafe.Pointer(&state)), unsafe.Sizeof(state))
}Postgres starts a new process per connection, those probably need it too (not measured, a connect is ~30 ms here).
Second, smaller: opcache.revalidate_freq = 0 (internal/php/php.go:477) makes OPcache stat every included file on every request. On Windows each stat goes through Defender's filter driver, ~0.2 ms per file here, and a Filament page includes ~2,200 files. With revalidate_freq = 2 /up went from 451 to 289 ms (same as validate_timestamps = 0). 2 would be a better default on Windows.
Checked and not the cause: OPcache (on, shared by the workers), Caddy (same times when going to the worker directly), the Xdebug pool (unused), worker age.
Steps to reproduce
- Windows 11 on a hybrid Intel CPU (Core Ultra 5 135U here), on AC, Balanced power mode
- Serve a Laravel app with Flock (FastCGI)
- Time
/upthrough Flock, then the same request against a php-cgi started from a terminal with the same php.ini andPHP_INI_SCAN_DIR: the Flock one is ~2× slower - Opt one Flock worker out of power throttling (
SetProcessInformation,ProcessPowerThrottling, ControlMask = 1, StateMask = 0): it drops to the terminal one's time
Logs
Activity
onairmarc commentedon Nov 18, 2026
Please upgrade to
v1.0.0and report if the issue is still happening.