To free RAM safely, first verify whether MongoDB is actually causing memory pressure, then reduce the WiredTiger cache only enough to leave room for Linux and your other services. MongoDB also uses otherwise idle RAM as filesystem cache, so a high Linux “used” figure is not automatically a leak. If measured resident memory, cache, applications and a safety margin still exceed the VPS limit, resizing the VPS is the durable fix.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What “MongoDB is using all my RAM” usually means
A Linux VPS has two different kinds of memory use in this situation. The mongod process reserves memory for its own execution, including the WiredTiger storage engine, connections, indexes and temporary work. Linux separately fills unused RAM with filesystem cache for recently read database files. MongoDB documents that, with this filesystem cache, it automatically uses free memory not occupied by the WiredTiger cache or other processes.
As an Amazon Associate I earn from qualifying purchases.
That is why the used column in free -h can look alarming while the machine still has useful reclaimable memory. The number that matters first is available, together with swap activity and whether the kernel is reclaiming memory aggressively. Filesystem cache can be discarded when another process needs RAM; WiredTiger cache and the process’s resident memory are different consumers.
The default WiredTiger calculation
MongoDB’s current version 7.0 mongod documentation describes the default WiredTiger cache as the larger of:
#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.
- 50% of (physical RAM minus 1 GB); or
- 0.256 GB.
For example, on an 8 GB machine the first calculation is 50% of 7 GB, or 3.5 GB. On a 2 GB machine it is 0.5 GB. On a very small machine where the first calculation is below 0.256 GB, the 0.256 GB floor is larger. This is the internal WiredTiger cache only, not a promise that mongod will stay below that amount of total RAM.
Why the cache setting is not a process-memory limit
storage.wiredTiger.engineConfig.cacheSizeGB and cacheSizePct constrain the WiredTiger internal cache. They do not cap connection memory, thread and process overhead, index builds, other database allocations or Linux filesystem cache. Lowering the setting can therefore create headroom without reducing resident memory by the same number of gigabytes. It can also cause more frequent eviction and disk I/O.
Recommended Free Tools
Measure pressure before changing MongoDB
Take a baseline while the VPS is experiencing the problem. Keep the values so you can compare the result of every change rather than judging by one glance at a memory graph.
- Check host-level pressure. Run
free -h. Recordavailable, total swap and used swap. A highusedvalue with comfortableavailablememory is often normal filesystem caching. Low available memory, rising swap or aggressive reclaim indicates real pressure. - Identify the resident process. Run
ps -o pid,rss,vsz,cmd -C mongodand note the resident set size (RSS) for eachmongod. Usetopto watch the process and other large consumers over time. RSS is not the same as WiredTiger cache size, but it shows how much RAM the database process currently occupies. - Capture MongoDB’s counters. In the MongoDB shell, run
db.serverStatus(). Recordmem.resident,wiredTiger.cache.maximum bytes configured,wiredTiger.cache.bytes currently in the cache, dirty bytes and eviction counters. MongoDB notes that available statistics can vary by release, so record the exact server version with the snapshot. - Look for competing services. In
topand your service inventory, identify application workers, build jobs, queues, monitoring agents, another database instance or anything that grew at the same time as the alert. A MongoDB cache change cannot reclaim memory held by those processes.
The mem.resident field is approximately the database process RAM in mebibytes. Compare it with the RSS from Linux, allowing for sampling and release differences. The WiredTiger maximum and current-byte fields tell you whether the internal cache is near its configured ceiling; they do not account for every byte in RSS.
Check the memory limit visible to MongoDB
A container or cgroup may expose less memory than the VPS host. Docker, LXC and Kubernetes workloads can therefore be overcommitted if MongoDB sizes its cache against physical host RAM rather than the limit applied to the process.
Rank #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
- Run
db.hostInfo()in MongoDB. - Inspect
hostInfo.system.memLimitMB. - Compare that value with the memory limit assigned to the container or cgroup, not only with the VPS provider’s advertised physical RAM.
- Use the lower, process-visible limit when deciding how much room to reserve for WiredTiger and every other process.
MongoDB’s documentation requires the configured cache to remain below memory available to a constrained container. If the host has 8 GB but the container limit is 2 GB, sizing from 8 GB can trigger an out-of-memory kill even though the physical machine appears lightly used.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesReduce the WiredTiger cache deliberately
When measurements show that the cache is crowding out the operating system or co-located services, set an explicit lower value in the active MongoDB configuration, commonly /etc/mongod.conf. Use the syntax supported by your installed MongoDB version:
storage:
wiredTiger:
engineConfig:
cacheSizeGB: 0.5
You may use cacheSizePct instead of cacheSizeGB. A percentage can be useful when the same configuration is deployed on machines with different memory sizes; an absolute value makes the reserved amount easy to audit on one fixed VPS. Choose one setting, follow the syntax documented for your release, and do not copy the 0.5 GB example without calculating your own headroom.
How much headroom to leave
Start with the memory actually required by the application and operating system, then add room for SSH, monitoring, filesystem cache and normal workload bursts. If two mongod instances share one VPS, reserve memory for both; MongoDB’s default assumes one instance per machine. The remaining amount is the maximum practical cache budget, subject to the documented minimum effective range beginning at 0.256 GB and to the workload’s working set.
Do not raise the cache above MongoDB’s default merely because the VPS has unused memory. The official guidance recommends avoiding increases above the default and reducing the cache when other consumers need RAM. A smaller cache is a trade-off: it creates potential headroom but may evict hot pages sooner and increase reads from storage.
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)
Apply the change and keep a rollback
- Copy the current configuration or commit it to your configuration-management system.
- Edit the active
storage.wiredTiger.engineConfigsection, changing only the cache option you intend to test. - Validate the file using the normal configuration validation process for your MongoDB package.
- Restart
mongodthrough the VPS’s service manager during a maintenance window. A restart is required for the new cache setting to take effect. - After the service is healthy, run
db.serverStatus()again and check the configured maximum, current cache bytes, resident memory, dirty bytes and eviction counters. - Recheck
free -h,topand disk-I/O telemetry. Keep the previous configuration available so you can restore it if latency or eviction becomes unacceptable.
Judge the change over representative traffic, not immediately after the restart. A lower cache can look successful while the cache is cold; increased reads, eviction work or query latency may appear only after the normal working set returns.
Remove other memory consumers
If the baseline shows that services besides MongoDB consume the missing RAM, reclaim that memory directly instead of forcing WiredTiger to absorb the entire burden.
- Stop disabled or forgotten services and scheduled build jobs.
- Reduce application worker counts or queue sizes that expanded beyond the VPS’s capacity.
- Shut down an unused second database instance, or give each instance a separately calculated cache budget.
- Move monitoring, CI builds or data-processing jobs to another host when they compete with production queries.
- Check for a recent deployment that increased connection counts, index-building activity or in-memory buffering.
Every service needs a safety margin. A cache value that fits when the application is idle can still fail during a deployment, backup, index build or traffic spike.
Do not treat filesystem-cache clearing as the fix
Linux may refill filesystem cache because MongoDB and the kernel use available RAM to cache database files. Clearing that cache can make free look better briefly, but it does not lower the WiredTiger limit or reduce the workload. The next reads then come from storage again, increasing I/O and often making queries slower.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Use cache dropping only as a controlled diagnostic to distinguish reclaimable filesystem cache from a resident-process problem, and restore normal operation afterward. It is not a persistent configuration change and should never replace right-sizing the cache, removing a competing consumer or adding RAM.
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
Use swap only as emergency headroom
A small, fast swap area can prevent an isolated burst from immediately killing a process. It cannot supply the latency of RAM. Sustained MongoDB paging usually means the VPS is undersized or the workload and cache allocation do not fit together.
After enabling or resizing swap, watch swap activity, query latency and disk I/O. If the system continuously pages, lower the workload or cache only as a temporary mitigation and plan a memory upgrade. Do not present swap as a substitute for the RAM required by the dataset, indexes, connections and co-located services.
Free tools Windows power users keep installed
One-click scans. No signup required.
When a VPS resize is the correct answer
Resize the VPS, or move MongoDB to a separate instance, when measured process memory, filesystem cache, the application and a reasonable safety margin still exceed the available limit after cache tuning. MongoDB does not publish one universal RAM number because the correct size depends on the working set, query pattern, connection count, index operations and everything else running on the machine.
A larger VPS preserves room for the WiredTiger cache and the operating system instead of continually trading cache hits for eviction and storage reads. Before the change, record:
mem.residentand process RSS;- WiredTiger maximum and current cache bytes;
- dirty bytes and eviction activity;
- available RAM and swap use;
- representative query latency and disk I/O.
Repeat the same measurements after the resize. This makes the decision reviewable and reveals whether the bottleneck was capacity, an unusually large competing service or a workload that needs query and index changes.
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.
Choose a remedy by trade-off
| Remedy | Immediate headroom | Performance effect | Persists after restart? | Operational risk | Cost |
|---|---|---|---|---|---|
| Lower WiredTiger cache | Usually frees room inside the database’s allocation | More eviction and potentially more disk reads | Yes, when saved in configuration | Requires restart and workload monitoring | No VPS-cost increase |
| Stop or reconfigure competing services | Depends on the service’s resident memory | May reduce application capacity or background throughput | Yes, if the service configuration is changed | Risk of disabling a needed process | Usually none |
| Clear Linux filesystem cache | Temporary and often reclaimable memory | Extra reads while the cache warms again | No | Diagnostic only | None |
| Add swap | Emergency burst tolerance | Paging can make latency unacceptable | Yes, if configured persistently | Can hide an undersized VPS | Storage and provider dependent |
| Resize VPS or separate MongoDB | Adds durable capacity | Usually preserves cache headroom; migration has its own risk | Yes | Change window, cost and possible migration work | Higher recurring infrastructure cost |
Validate the result after every change
Use the same observation window and workload before and after a change. A successful adjustment has more available memory without unacceptable database behavior.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- Memory: available RAM rises, swap activity is stable or falling, and the kernel is not repeatedly reclaiming under normal traffic.
- MongoDB: resident memory and current cache bytes stay within the new plan; dirty bytes and eviction counters do not grow without recovery.
- Performance: query latency, throughput and error rates remain within your service objective.
- Storage: disk reads and I/O wait do not increase enough to erase the memory benefit.
- Capacity: a burst, deployment or index operation still has explicit headroom.
If latency worsens while eviction and disk reads rise, the cache reduction was too aggressive for the working set. Restore the previous value or add RAM, then address the competing consumer that caused the original pressure.
Troubleshooting common outcomes
“free” still shows most RAM as used
Check available, not only used. Linux filesystem cache is expected to occupy otherwise idle memory and can be reclaimed. If available memory is healthy and swap is inactive, there may be no problem to fix.
Lowering the cache did not lower RSS by the same amount
The setting controls WiredTiger’s internal cache, while RSS also includes process overhead, connections, indexes and other allocations. Confirm the new maximum and current cache fields in serverStatus; then investigate the remaining consumers separately.
The VPS is killed by the OOM handler after a cache change
Check whether MongoDB is inside a cgroup and compare hostInfo.system.memLimitMB with the host’s physical RAM. A container limit may be much smaller. Also inspect application workers and any second mongod; the cache must fit below the process-visible limit with room for them.
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 minuteQueries became slower after reducing the cache
Compare eviction counters, dirty bytes, disk I/O and latency with the baseline. More eviction is the expected cost of a smaller cache. Increase the VPS size, move MongoDB away from competing services or revise the workload if the lower setting cannot meet latency requirements.
Memory pressure returns after a few hours
Look for a workload that grows over time: connection counts, queues, scheduled jobs, index builds or a second process. Check both current and maximum cache values and monitor the trend rather than taking another one-time snapshot. Recurring pressure that remains after service cleanup is a capacity problem, not a filesystem-cache display issue.
Quick Recap
A safe operating checklist
- Record
free -h,top,ps -o pid,rss,vsz,cmd -C mongodand MongoDBserverStatusvalues. - Determine whether the process runs under a container or cgroup and record
hostInfo.system.memLimitMB. - Calculate headroom for Linux, filesystem cache, the application, SSH, monitoring and every MongoDB instance.
- Lower
cacheSizeGBor usecacheSizePctin the active configuration only when the measurements justify it. - Restart during a maintenance window, retain the old configuration and monitor eviction, dirty bytes, I/O and latency.
- Remove unnecessary consumers and treat filesystem-cache clearing as diagnostic only.
- Use swap for short-lived protection, not sustained paging.
- Resize the VPS or separate MongoDB when the measured workload still cannot fit.
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.




