diff --git a/Sources/Containerization/LinuxContainer.swift b/Sources/Containerization/LinuxContainer.swift index 8fa95a45..5ab42583 100644 --- a/Sources/Containerization/LinuxContainer.swift +++ b/Sources/Containerization/LinuxContainer.swift @@ -524,9 +524,9 @@ extension LinuxContainer { // Calculate VM memory with overhead for the guest agent. // The container cgroup limit stays at the requested memory, but the VM - // gets an additional 50MB for the guest agent (could be higher, could be lower - // but this is a decent baseline for now). - let guestAgentOverhead: UInt64 = 50.mib() + // gets an additional 75MiB for the guest agent (could be higher, could + // be lower but this is a decent baseline for now). + let guestAgentOverhead: UInt64 = 75.mib() let mib: UInt64 = 1.mib() let vmMemory = (self.memoryInBytes + guestAgentOverhead + mib - 1) & ~(mib - 1) diff --git a/vminitd/Sources/vminitd/AgentCommand.swift b/vminitd/Sources/vminitd/AgentCommand.swift index 76eb7f78..b361dde2 100644 --- a/vminitd/Sources/vminitd/AgentCommand.swift +++ b/vminitd/Sources/vminitd/AgentCommand.swift @@ -150,8 +150,8 @@ struct AgentCommand: AsyncParsableCommand { } t.start() - let eg = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount) - let blockingPool = NIOThreadPool(numberOfThreads: System.coreCount) + let eg = MultiThreadedEventLoopGroup(numberOfThreads: 1) + let blockingPool = NIOThreadPool(numberOfThreads: 2) blockingPool.start() let server = Initd(log: log, group: eg, blockingPool: blockingPool)