Skip to content

Commit ceee3a6

Browse files
authored
vminitd: Lower nio event loop group threads to 1 (apple#677)
1 parent 250546f commit ceee3a6

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Sources/Containerization/LinuxContainer.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,9 @@ extension LinuxContainer {
524524

525525
// Calculate VM memory with overhead for the guest agent.
526526
// The container cgroup limit stays at the requested memory, but the VM
527-
// gets an additional 50MB for the guest agent (could be higher, could be lower
528-
// but this is a decent baseline for now).
529-
let guestAgentOverhead: UInt64 = 50.mib()
527+
// gets an additional 75MiB for the guest agent (could be higher, could
528+
// be lower but this is a decent baseline for now).
529+
let guestAgentOverhead: UInt64 = 75.mib()
530530
let mib: UInt64 = 1.mib()
531531
let vmMemory = (self.memoryInBytes + guestAgentOverhead + mib - 1) & ~(mib - 1)
532532

vminitd/Sources/vminitd/AgentCommand.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ struct AgentCommand: AsyncParsableCommand {
150150
}
151151
t.start()
152152

153-
let eg = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount)
154-
let blockingPool = NIOThreadPool(numberOfThreads: System.coreCount)
153+
let eg = MultiThreadedEventLoopGroup(numberOfThreads: 1)
154+
let blockingPool = NIOThreadPool(numberOfThreads: 2)
155155
blockingPool.start()
156156
let server = Initd(log: log, group: eg, blockingPool: blockingPool)
157157

0 commit comments

Comments
 (0)