Start with worker_processes auto;. NGINX will try to match its worker count to the CPU capacity visible to the NGINX process, which is the capacity that matters inside a virtual machine, container, cgroup, or cpuset. Use an explicit number only when measurements or a deployment constraint show that automatic sizing is unsuitable.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
That setting controls request-processing workers, not the master process. Correct sizing also requires a realistic worker_connections value and sufficient file descriptors; adding workers alone does not guarantee more usable connections.
As an Amazon Associate I earn from qualifying purchases.
What NGINX worker processes do
An NGINX installation has one master process and one or more worker processes. The master reads the configuration, opens or inherits listening sockets, and manages workers. Workers accept connections and perform the request work: serving static files, terminating TLS, proxying to upstream applications, and sending responses.
The worker_processes directive controls how many workers NGINX starts. Its syntax is number or auto, and the documented default is 1. A single worker can be perfectly adequate for a small, lightly used service, but it leaves other available CPU capacity unused when request processing is parallel or CPU-intensive.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
There is no universal number that wins for every deployment. NGINX documentation notes that the optimal value depends on CPU cores, the number of hard drives storing data, and the workload pattern. Static-file delivery, TLS handshakes, reverse proxying, compression, logging, and disk-heavy responses stress different resources, so CPU count is a starting point rather than a complete sizing formula.
Should the worker count equal the number of CPU cores?
Usually, begin with worker_processes auto; instead of manually copying a host’s core count. NGINX attempts to detect the CPU capacity available to the process and choose a corresponding worker count. This is particularly important in containers and virtual machines, where the physical host may have many CPUs but the NGINX process may be restricted to a smaller quota or CPU set.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchEqualing workers to visible CPUs is a useful baseline, not a rule that must be followed forever. An explicit value can be justified when:
- Load tests show that a lower or higher count improves latency, throughput, or CPU efficiency.
- An orchestrator assigns a fixed CPU set or quota and automatic detection does not match the intended allocation.
- A platform, licensing policy, or operational standard requires a fixed process count.
- You need a controlled experiment with a stable number of workers across hosts.
Do not increase workers simply because the host reports more CPUs. If the NGINX container can run on two CPUs, configuring 16 workers does not create 16 CPUs; it can increase scheduling overhead and make CPU contention harder to diagnose.
How to find the CPUs NGINX can actually use
Count CPUs from the same execution environment as NGINX. A host-level total can be misleading when a VM, container runtime, cgroup, or cpuset limits the process.
Linux host or virtual machine
Run these commands in the VM or operating-system instance that runs NGINX:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
nproc
getconf _NPROCESSORS_ONLN
lscpu
nproc reports the processing units available to the current environment. getconf _NPROCESSORS_ONLN reports online processors, while lscpu provides topology and affinity details useful when diagnosing a mismatch. Compare the result with the VM’s assigned vCPUs, not only with the physical server’s CPU count.
Docker or another container runtime
Execute the count inside the running container, where the process sees its limits:
docker exec <container-name> nproc
If the image does not include nproc, use an equivalent command available in that image, such as:
docker exec <container-name> getconf _NPROCESSORS_ONLN
Also inspect the container or orchestrator configuration for a CPU quota and cpuset assignment. A container may expose a host CPU count while still being throttled to a smaller quota, or it may be pinned to a particular subset of CPUs. The effective capacity is the intersection of those restrictions.
Orchestrated workloads
For Kubernetes and similar systems, check the pod’s resource limits and CPU affinity settings in addition to running a command inside the container. A request describes scheduling intent; a limit or cpuset determines what the process can consume at runtime. If those settings change during deployment, recheck the visible CPU set after the rollout.
Windows and mixed environments
If NGINX runs under a compatibility layer or on a mixed operating-system setup, use the processor count presented to the NGINX process rather than a control-panel total. The principle is the same: configure from the process’s effective CPU view, then verify behavior under representative load.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Configure worker_processes auto
Place the directive in the main context of nginx.conf, outside the events, http, and server blocks:
worker_processes auto;
events {
worker_connections 512;
}
The auto parameter is supported in NGINX versions 1.3.8 and 1.2.5 and later. Check the version supplied by your distribution before relying on it; current mainstream packages support it, but an old embedded build may not.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Apply the change safely
- Edit the active configuration file and set
worker_processes auto;in the main context. - Validate syntax before touching the running service:
nginx -tThe test should report a successful configuration test. Fix any path, permission, or syntax error before continuing.
- Reload rather than stopping the service:
nginx -s reloadA service manager’s reload action is also acceptable when it maps to the same graceful operation.
- Confirm that the new generation of workers is running. Use the process list or your service manager’s status output and distinguish the master from the workers.
- Measure CPU utilization, request latency, throughput, connection counts, and error rates during a representative traffic period. Keep the setting if it improves or maintains the service’s objectives; otherwise test an explicit value.
auto versus an explicit worker count
| Choice | How it behaves | Best starting use | What to verify |
|---|---|---|---|
worker_processes auto; |
NGINX attempts to choose workers from CPU capacity visible to the process. | Most VMs, containers, and conventional servers. | Effective CPU quota or cpuset, worker count after reload, and performance under load. |
worker_processes 1; |
Starts one request-processing worker. | Very small services, debugging, or deliberately serialized workloads. | Whether one worker becomes a CPU or event-loop bottleneck. |
worker_processes N; |
Starts the specified number of workers regardless of automatic detection. | Measured tuning, fixed orchestration policy, or a repeatable benchmark. | CPU saturation, context switching, latency, connection limits, and upstream capacity. |
NGINX’s HTTPS guidance recommends several workers on multiprocessor systems, no fewer than the available CPU cores, and uses worker_processes auto; in a multicore example. Treat that as a starting point. A disk-bound workload, a constrained upstream, or a strict CPU quota can make fewer workers more appropriate, while CPU-heavy TLS or compression may benefit from enough workers to keep the assigned CPUs busy.
Size worker_connections separately
worker_connections sets the maximum number of simultaneous connections opened by one worker. Its documented default is 512. The count includes connections to proxied upstream servers, not only client sockets, and cannot exceed the process’s open-file limit.
A rough configuration ceiling is the worker count multiplied by the per-worker connection setting, but that is not a promise of usable client capacity. Reverse proxying can consume a client connection and an upstream connection at the same time. TLS, logs, cached files, listening sockets, and other descriptors consume file entries as well.
Raise the limits as a coordinated change
- Estimate concurrent client and upstream connections during the peak, including keep-alive and long-lived requests.
- Choose a
worker_connectionsvalue that leaves headroom instead of matching the observed peak exactly. - Check the service and operating-system open-file limits. If the limit is lower than the intended connection ceiling, NGINX cannot use the configured number.
- Reload and observe active connections, descriptor usage, and errors such as “too many open files.”
Increasing worker_connections without raising file limits can produce no benefit. Increasing workers without adjusting connection and descriptor capacity can also leave the real bottleneck unchanged.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
When an explicit number is useful
Measured CPU contention
Run a repeatable load test that matches the real request mix. Compare a few worker counts while recording tail latency, throughput, CPU utilization, run-queue pressure, and error rates. Select the smallest count that meets the service objective with headroom; the highest worker count is not automatically the fastest.
CPU quotas and noisy neighbors
Suppose a host has many cores but the container is limited to a small CPU quota. Automatic detection may see the available processing units, but throttling or a cpuset can still restrict execution. Confirm the runtime’s effective assignment, then test an explicit count if the automatically selected number creates excess scheduling or makes throttling worse.
Mixed workload roles
An NGINX instance that mostly serves cached static files may spend little CPU per request, while one terminating many TLS sessions or compressing responses can be CPU-heavy. A reverse proxy that waits on upstream applications may be limited by upstream latency rather than local CPU. These differences are why the official guidance includes disks and load pattern alongside CPU cores.
Operational consistency
A fixed count can make capacity planning and incident comparison easier across identical nodes. Document the CPU allocation that justified it; if the VM size or container limit changes, revisit the decision instead of carrying the old number forward.
Recommended Free Tools
CPU affinity: use only for deliberate placement
Workers are not bound to specific CPUs by default. The worker_cpu_affinity directive can bind workers to CPU sets represented by bitmasks. Its auto affinity mode is documented for FreeBSD and Linux.
Affinity can help when you have a measured placement problem, such as isolating NGINX from another latency-sensitive process or aligning workers with dedicated CPUs. It can also hurt when the container or orchestrator already assigns a cpuset. A mask that refers to CPUs unavailable inside the container can be ineffective or produce confusing behavior, and manually pinning workers can prevent the scheduler from balancing bursts across the CPUs you actually paid for.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Do not add affinity as a substitute for measuring worker count. First establish the effective CPU allocation and baseline performance, then test affinity as an isolated change. Remove it if latency, throughput, or CPU utilization worsens.
Diagnose common sizing problems
The host has 32 cores but NGINX starts fewer workers
Check where you counted. Run the CPU command inside the VM or container, inspect cgroup and cpuset restrictions, and verify that the configuration was reloaded successfully. A host total is not necessarily the CPU set visible to the NGINX process.
More workers do not increase throughput
Look for a different bottleneck: upstream response time, disk latency, network bandwidth, TLS cost, file-descriptor limits, or CPU throttling. Confirm that the test generates enough concurrent work and that the workers are actually receiving requests. More processes cannot overcome an exhausted upstream or a low open-file ceiling.
Connections fail at a lower number than expected
Check both sides of a proxied connection. Each request may consume client and upstream descriptors, and the per-worker limit is bounded by the process open-file limit. Review NGINX error logs and operating-system limits, then increase limits only after confirming available memory and upstream capacity.
Reload appears successful but old workers remain
A graceful reload allows existing workers to finish active requests. During long-lived connections, old and new generations can coexist temporarily. Check the process list over time and investigate workers that never exit, rather than repeatedly increasing the configured count.
CPU usage is low but latency is high
Low local CPU does not prove that workers are undersized. Requests may be waiting on an upstream service, storage, DNS, or a client connection. Inspect upstream timing, I/O wait, and connection states before changing worker_processes.
Free tools Windows power users keep installed
One-click scans. No signup required.
A practical tuning checklist
- Count CPUs from the same VM, container, cgroup, or cpuset in which NGINX runs.
- Use
worker_processes auto;as the initial configuration. - Keep the directive in the main context and validate with
nginx -t. - Reload gracefully and verify the master and worker generations.
- Set
worker_connectionsindependently from worker count. - Check open-file limits, remembering that proxied upstream sockets count too.
- Test with representative static, TLS, proxy, or disk-heavy traffic rather than a synthetic request that omits the real bottleneck.
- Record CPU utilization, tail latency, throughput, active connections, and errors for each tested value.
- Use an explicit worker number only when measurements or a deployment constraint provide a reason.
- Apply CPU affinity only after deliberate testing and only when it agrees with the platform’s CPU assignment.
Bottom line
For most current NGINX deployments, the correct first setting is worker_processes auto;. It lets NGINX respond to the CPU capacity visible to its process, including VM and container limits. Confirm that worker count after reload, size worker_connections and file descriptors as separate limits, and move to an explicit number only when measured workload results or a fixed deployment policy justify it.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




