Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsiTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Optimize a LAMP server’s RAM by treating concurrency as a budget, not by assigning a fixed number of megabytes to each Apache worker. Measure the resident memory (RSS) of Apache, PHP-FPM and MySQL during representative peak traffic; reserve memory for the kernel, filesystem cache and bursts; then set Apache’s MaxRequestWorkers, PHP-FPM’s pm.max_children and MySQL’s buffer pool and connection ceiling so their combined worst case stays inside physical RAM without swapping.
For new Apache deployments, run PHP through PHP-FPM and mod_proxy_fcgi, use the event MPM when your modules support it, and verify every change with queue, latency, RSS and swap metrics. There is no universal “RAM per Apache worker” number: the application, loaded modules, request mix and PHP extensions determine the result.
Recommended Free Tools
Why RAM becomes the bottleneck
Every unit of concurrency consumes memory. In Apache prefork, each active child is a process with its own address space. In worker and event, Apache serves requests with threads, but each process still has a baseline footprint and loaded modules can add private or shared memory. PHP adds another layer when requests are handled by PHP-FPM children. MySQL then competes for the remaining RAM, while the operating system needs memory for the kernel, filesystem cache, SSH, monitoring and short-lived spikes.
When the combined demand exceeds physical RAM, Linux reclaims cache and eventually swaps anonymous pages. Latency rises sharply, requests queue, and a machine can become unresponsive even though CPU utilization looks moderate. Apache’s documentation calls RAM the single biggest hardware issue affecting web-server performance. The practical consequence is that concurrency limits must be derived from measurements and a safety margin.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
Measure the real workload before changing limits
Capture a representative busy period rather than a quiet minute after a restart. Record the following at several points during the peak:
- Total and available memory, swap use and swap-in/swap-out activity.
- CPU load and run queue, because reducing concurrency cannot cure CPU saturation.
- Apache MPM, process or thread counts, and per-process RSS.
- PHP-FPM active, idle and total children, queue length and child RSS.
- MySQL process RSS, connection count and active connections.
- Request concurrency and latency for static, dynamic and background endpoints.
Useful operating-system checks
On a Linux host, take a baseline with:
free -h
swapon --show
vmstat 1 10
ps -o pid,ppid,rss,cmd -C apache2 -C httpd -C php-fpm
ps -o pid,rss,cmd -C mysqld -C mariadbd
The RSS value is resident memory in KiB. Shared pages mean that simply adding every process RSS can overstate total use, while private pages and allocator fragmentation can make a theoretical sum too low. Use the process figures as an operational estimate, then leave headroom and validate under load.
Identify Apache’s MPM and effective configuration
Check the loaded MPM and effective directives rather than assuming the distribution default:
apachectl -V | grep -i mpm
apachectl -t -D DUMP_RUN_CFG
apachectl -M
apachectl -M also reveals whether PHP is embedded as mod_php and which modules are loaded. Keep a copy of the output before editing so a rollback restores the previous state.
Build a shared-memory budget
Start with physical RAM and subtract a reserve for the operating system and non-service activity. From what remains, reserve the measured peak for MySQL, Apache and PHP-FPM, plus a margin for bursts. A planning expression is:
RAM available to services
= physical RAM
- OS/cache/management reserve
- burst and safety reserve
Apache budget + PHP-FPM budget + MySQL budget
<= RAM available to services
This is a budgeting method, not a universal formula. The reserve must reflect your backup jobs, log rotation, monitoring agents, kernel behavior and traffic volatility. If the host already swaps during normal peaks, reduce concurrency or move a service before tuning finer details.
Illustrative calculation
Suppose a 16-GB machine measures 1.5 GB for the OS and management, and you intentionally keep 2 GB for bursts. About 12.5 GB remains for the services. If Apache’s measured peak is 2.5 GB, PHP-FPM’s is 4 GB and MySQL’s is 5 GB, the total is 11.5 GB and leaves roughly 1 GB of additional margin. If a proposed increase in PHP children would consume that margin, do not make the change without reducing another budget or adding RAM. The figures are examples; substitute your own RSS measurements.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
Choose the Apache MPM and separate PHP
PHP’s current Apache guidance says, “Do not use mod_php for new installations.” The recommended arrangement is PHP-FPM behind Apache’s mod_proxy_fcgi. PHP then runs in its own pool, can be restarted independently, and is compatible with Apache’s event MPM. By contrast, embedded mod_php loads PHP into every Apache worker and generally requires prefork unless PHP was built thread-safe.
| MPM | Concurrency unit | Memory and compatibility implications | When it fits |
|---|---|---|---|
| prefork | Child processes | Each child carries process memory and embedded PHP commonly forces this model. It is simple but usually the heaviest option at high concurrency. | Legacy, non-thread-safe modules or an unavoidable embedded-PHP installation. |
| worker | Threads inside Apache processes | Usually a smaller footprint than prefork, but every loaded module must be thread-safe. | Thread-safe modules when event-style connection handling is not required. |
| event | Threads plus supporting handling for idle keep-alive connections | Frees main request threads from some connection-management work and pairs well with PHP-FPM. | Modern Apache with thread-safe modules and PHP kept outside Apache. |
Changing MPM is not a blind memory switch. Audit modules first, test application behavior, and change one architectural variable at a time. A module that is not thread-safe can make worker or event unsafe regardless of the apparent RAM savings.
Cap Apache concurrency safely
Set MaxRequestWorkers from measured memory
MaxRequestWorkers is Apache’s primary hard cap. In prefork it is the maximum number of child processes. In worker and event it is the total number of request threads. Once the limit is reached, additional requests wait for an available slot; they do not create unlimited processes.
For prefork, estimate a process ceiling by dividing the Apache memory budget by the measured peak private memory per child, then round down and retain headroom. For threaded MPMs, account for the memory of the Apache process group and the thread stack and module overhead; do not assume a thread uses the same amount as a separate prefork process.
# Example only; replace with measured values
# Apache budget: 2500 MiB
# conservative per-child estimate: 80 MiB
# 2500 / 80 = 31, so begin below that, for example 28
The example is a starting point, not a benchmark or recommendation for every host. Recheck RSS and latency after the change.
Do not inflate ServerLimit
ServerLimit sets the maximum process capacity available to the MPM. Setting it unnecessarily high allocates extra shared memory, even when those processes are never used. Apache warns that setting ServerLimit and MaxRequestWorkers beyond system capacity can prevent a safe start or destabilize the machine. Keep ServerLimit only as high as the largest planned process count, and test configuration syntax before restarting.
apachectl configtest
systemctl reload apache2 # Debian/Ubuntu service name
# or
systemctl reload httpd # RHEL-family service name
If a reload or restart fails, inspect the service journal and restore the last known-good values. Never raise both limits merely to eliminate a queue; a queue is safer than swapping.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Remove modules the site does not use
List loaded modules and identify features that are not required by the application. Apache’s performance guidance notes that eliminating unused modules reduces memory use. On a test copy of the configuration, comment out one LoadModule line at a time, run apachectl configtest, exercise the site, and compare process RSS. Keep modules needed for TLS, authentication, URL rewriting, proxying and observability.
Size PHP-FPM pools
PHP-FPM limits simultaneous PHP execution independently of Apache. The key setting, pm.max_children, is the maximum number of child processes for dynamic and ondemand pools, and the fixed child count for a static pool.
Choose a process-manager mode
| Mode | How workers are created | RAM behavior | Trade-off |
|---|---|---|---|
ondemand |
Creates children only when requests arrive. | Lowest idle footprint on a quiet host. | New bursts can incur process-start latency. |
dynamic |
Maintains spare workers and grows up to pm.max_children. |
Balances warm capacity with bounded memory. | Requires coherent spare-process settings and monitoring. |
static |
Keeps exactly pm.max_children children. |
Most predictable, but reserves the full child budget continuously. | Can waste RAM when traffic is intermittent. |
On a small or bursty shared host, ondemand can avoid paying for idle PHP workers. A consistently busy application may favor dynamic. Use static only when the measured fixed footprint fits comfortably and predictable capacity is worth the reservation.
Calculate pm.max_children
After reserving Apache, MySQL and the OS, divide the PHP budget by the measured peak RSS of a PHP child plus a safety margin:
pm.max_children
<= PHP memory budget / conservative child RSS
Measure children while representative requests run. Do not multiply PHP’s memory_limit by the child count: memory_limit is a per-script ceiling, and most requests do not necessarily reach it. The ceiling can also exclude some process-level overhead, extensions and allocator behavior.
For example, if 3,600 MiB is available to PHP and a conservative child estimate is 90 MiB, the arithmetic gives 40 children. Start below that result if measurements are sparse, then observe queueing and RSS before increasing it. If Apache can accept more requests than PHP can execute, requests queue at the FPM boundary; that is preferable to exhausting RAM.
Recycle leaking workers with pm.max_requests
Set pm.max_requests to recycle a child after a defined number of requests when third-party code or an extension accumulates memory. PHP documents this as a workaround for leaks; it does not identify or repair the leaking code. Track child RSS over its lifetime and investigate the extension or application path while using recycling to keep the service stable.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Apply memory_limit deliberately
The current PHP core-INI documentation lists a default memory_limit of 128M. It limits the memory a script may allocate, not the total RSS of an FPM process. Lowering it can protect a constrained host, but an application that legitimately builds reports, image transformations or large imports may fail with “Allowed memory size exhausted.” Set it from observed peak request needs, deploy gradually, and review PHP error logs after the change.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Coordinate MySQL with the web tier
A database-only machine can devote most of its RAM to InnoDB, but a shared LAMP host cannot. Reserve the measured Apache and PHP peaks first, then size the InnoDB buffer pool and connection ceiling inside what remains. Also account for per-connection buffers and temporary tables; a large max_connections value can create a worst case far above the buffer pool alone.
Oracle’s 2025 shape-specific examples demonstrate why copying a preset is unsafe. Their 16-GB MySQL.2.16GB shape lists an innodb_buffer_pool_size default of 10,737,418,240 bytes and max_connections of 1,000. Their 64-GB MySQL.8.64GB shape lists 51,539,607,552 bytes and 4,000 connections.
| Oracle service shape (2025) | innodb_buffer_pool_size default |
max_connections default |
How to interpret it on a shared host |
|---|---|---|---|
| MySQL.2.16GB | 10,737,418,240 bytes | 1,000 | Service-specific values; leave room for Apache, PHP and the OS rather than copying them. |
| MySQL.8.64GB | 51,539,607,552 bytes | 4,000 | Designed for that shape, not a portable shared-LAMP recommendation. |
Use actual connection concurrency, buffer-pool hit rate, query latency and MySQL RSS to choose lower ceilings where necessary. A connection limit that is higher than the application can use only increases potential memory pressure.
Verify changes with service-level signals
Expose FPM status privately
Enable the PHP-FPM status page only on an internal address or an authenticated administration path. The documented status data includes queue length, active, idle and total processes, maximum active processes, max children reached, memory peak and per-request memory.
- A growing queue or repeated
max children reachedindicates pool saturation. First confirm that raising the limit will fit the memory budget; otherwise optimize slow requests or add capacity. - A rising memory peak or child RSS means the per-child estimate is too low, the request mix changed, or a leak is present.
- Many idle workers with low traffic suggest that
dynamicorstaticis reserving more RAM than necessary; evaluateondemand.
Correlate all three tiers
Pair FPM data with Apache scoreboard or status output, request latency, operating-system pressure, swap-in/swap-out and MySQL process and connection metrics. Compare equivalent traffic windows after each change. Change one limit at a time so an improvement or regression has an identifiable cause. This measurement loop is more reliable than adopting a generic worker-per-gigabyte rule.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Common symptoms and corrective actions
The server swaps during traffic peaks
Confirm the timing with vmstat and memory graphs. Lower MaxRequestWorkers or pm.max_children to keep the combined peak inside RAM, and reduce an oversized MySQL buffer pool or connection ceiling. A temporary queue is preferable to sustained swapping. If legitimate demand still exceeds the measured budget, add RAM or move a tier to another host.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Apache refuses to start after a limit change
Run apachectl configtest and inspect the journal. Check that ServerLimit and MaxRequestWorkers are valid for the selected MPM and do not exceed process or shared-memory capacity. Restore the prior configuration if necessary, then increase in smaller steps.
PHP requests time out while Apache looks healthy
Check FPM queue length and max children reached. If PHP is saturated, profile slow application paths and database queries before adding children. Increase pm.max_children only when the PHP budget has measured headroom and MySQL will not be pushed into swapping.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Requests fail after lowering memory_limit
Review PHP logs for allocation errors and identify the endpoint and request size. Restore a value that accommodates the application’s observed peak, then optimize that operation or move it to a background job. Do not treat the per-script ceiling as a substitute for sizing FPM process memory.
Memory grows throughout the day
Track RSS by child age and endpoint. Set a temporary pm.max_requests recycling value, then isolate the leaking extension or code path. Recycling controls damage; it is not a permanent diagnosis.
Safe rollout checklist
- Save current Apache, PHP-FPM and MySQL configurations and record versions and service names.
- Measure peak RSS, concurrency, queueing, latency and swap behavior under representative traffic.
- Choose the MPM after auditing module thread safety; use PHP-FPM with
mod_proxy_fcgifor new installations. - Reserve OS and burst headroom, then calculate conservative Apache and FPM ceilings.
- Set
MaxRequestWorkersand avoid an unnecessarily highServerLimit. - Select
ondemand,dynamicorstaticfor each FPM pool and setpm.max_childrenfrom measured child RSS. - Set
pm.max_requestsonly as needed for leaks, and choose PHPmemory_limitfrom application requirements. - Fit MySQL’s buffer pool and connection ceiling into the remaining shared-host budget.
- Run configuration tests, reload one service at a time and watch logs and status pages.
- Compare equivalent traffic windows; keep the change only if memory pressure and user-visible latency improve.
Frequently asked questions
How many Apache workers can my RAM support?
There is no dependable universal number. Measure the resident memory of your actual Apache processes or thread-bearing process groups, reserve RAM for PHP-FPM, MySQL and the OS, and set MaxRequestWorkers below the resulting ceiling. The request mix and loaded modules can change the answer substantially.
Should PHP use prefork or event MPM?
For a new installation, use PHP-FPM through mod_proxy_fcgi and select event when every loaded module is thread-safe. Embedded mod_php commonly requires prefork and couples PHP memory and restarts to Apache.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteCan I use PHP’s 128M default to size an FPM pool?
No. 128M is the documented default per-script allocation ceiling, not a measured per-child RSS value. Size pm.max_children from observed child memory plus overhead and a safety margin.
Why not give MySQL most of the machine’s RAM?
Apache and PHP need room for concurrent requests, and the operating system needs cache and management memory. Database-only presets, including Oracle’s shape-specific examples, are not portable to a shared LAMP host. Allocate from measured web-tier peaks first and keep the host out of swap.
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.

