Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →iTechGuides 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.
To increase swap on an Ubuntu VPS, either replace the existing /swapfile with a larger, non-sparse file or add a second swap file. For a typical 4 GiB replacement, inspect the active configuration, run swapoff, recreate the file with dd, secure it with mode 600, initialize it with mkswap, enable it with swapon, and keep one matching entry in /etc/fstab.
Swap uses VPS disk space as overflow for memory; it does not increase physical RAM. Check free disk capacity and current memory pressure first, then verify the active total with swapon --show, cat /proc/swaps, and free -h.
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 errorsWhat increasing swap does—and what it cannot do
Linux uses swap as a backed-up memory area when RAM is under pressure. A swap file is stored on the VPS filesystem, while a swap partition is a dedicated block-device area. Both can be activated by swapon; mkswap can initialize either a file or a device.
More swap can prevent an application from being killed immediately during a short memory spike, and it gives the kernel more room to page out less-active memory. It is much slower than RAM, however. If the machine is continuously swapping, increasing the file may only postpone an underlying need for more RAM, fewer processes, or more storage.
#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.
A larger file also consumes persistent disk capacity. Leave room for the operating system, logs, package updates, databases, and application data. Check both memory and disk before making a change:
free -h
df -h
swapon --show
The commands below assume Ubuntu, root access through sudo, an existing file at /swapfile, and a target size of 4 GiB. A 4 GiB file is 4096 MiB, so the example uses count=4096 with bs=1M. Adjust the count only after confirming the desired size and available disk space.
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 & 11Crashes, 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 minuteInspect the current swap setup before changing it
Do not assume that the file is named /swapfile or that it is the only active swap area. Run all four checks as an administrator:
free -h
swapon --show
cat /proc/swaps
grep -nE 'sswaps' /etc/fstab
free -hreports total, used, and available RAM and swap in human-readable units.swapon --showlists every currently enabled swap area, its type, size, and usage.cat /proc/swapsconfirms what the running kernel has activated.- The
/etc/fstabsearch finds boot-time entries whose filesystem type isswap.
Record the exact active path. If the output shows a partition such as /dev/vda3 rather than a file, follow the partition guidance below instead of deleting an unrelated file. If several files or devices are listed, decide whether you want to enlarge one area or intentionally maintain multiple areas.
Also check that the target filesystem has enough free space:
df -h /
Creating a 4 GiB file requires at least that much usable space, plus operational headroom. A nearly full VPS can fail during file creation or leave no room for normal services.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose between replacing the file and adding another one
| Approach | What changes | Main advantage | Main risk or cost |
|---|---|---|---|
| Replace the existing file | Disable and remove the old file, then create one larger file at the same path | Leaves one simple swap area and one persistent /etc/fstab line |
swapoff temporarily removes that capacity and may fail if RAM cannot hold the paged-out data |
| Add a second file | Keep the current file active and create a distinct path such as /swapfile2 |
Avoids taking the original area out of service during creation | Consumes additional disk and leaves multiple active areas and persistent entries to manage |
Replacement is usually the cleanest result when the VPS has enough free RAM to turn swap off. Adding a second file is a practical alternative when removing the existing area would create unacceptable memory pressure or a long interruption. Neither option adds physical RAM or changes the VPS provider’s underlying allocation.
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
Replace an existing /swapfile with a larger file
1. Confirm the file is active and can be taken offline
Use the inspection commands first. If swapon --show lists /swapfile, disable that exact path before deleting it:
sudo swapoff /swapfile
swapoff must move any pages currently stored there back into RAM or another active swap area. If it reports insufficient memory, do not force the operation. Stop or scale down memory-heavy services, add a second swap file first, or schedule the replacement during a lower-load period.
2. Remove the old file
sudo rm -f /swapfile
Only remove the file after swapoff succeeds. If the active path differs, substitute the path you recorded; never delete a file merely because its name resembles a swap file.
3. Allocate a non-sparse 4 GiB file
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096 status=progress
This writes 4096 MiB of zeroes and displays progress. Ubuntu’s swapon(8) documentation identifies dd with /dev/zero as the most portable way to create a swap file. The write also avoids holes—unallocated ranges inside a nominally large file—that swapon rejects.
Wait for dd to finish and check for errors. If it stops with “No space left on device,” remove the incomplete, inactive file, free disk space, and retry with a size the filesystem can accommodate:
sudo rm -f /swapfile
df -h /
4. Secure and initialize the file
sudo chmod 600 /swapfile
sudo mkswap /swapfile
Mode 600 allows only root to read or write the file. mkswap writes the swap-area signature and metadata. It does not activate the area; as the mkswap(8) documentation states, the separate swapon command is required to start using it.
5. Enable the new area immediately
sudo swapon /swapfile
If this command succeeds, the kernel can use the new file without a reboot. Confirm its size and status before editing boot configuration:
Recommended Free Tools
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.
swapon --show
cat /proc/swaps
free -h
6. Make the setting survive reboot
Open the file as root:
sudoedit /etc/fstab
Ensure it contains one line for this swap file:
/swapfile none swap sw 0 0
Remove an obsolete line for the old path and eliminate duplicate lines for /swapfile. The entry tells Ubuntu to activate the file at boot. Save the file, then check it again:
grep -nE 'sswaps' /etc/fstab
There should be exactly one persistent line for each swap area you intend to keep. The system may currently be working even with a missing or duplicated line, so this check prevents the next reboot from exposing a configuration error.
Add a second swap file instead
Adding a second area keeps the original swap file active. Use a distinct path and choose a size that fits the available disk; the example creates 2 GiB (2048 MiB) at /swapfile2.
1. Create, protect, format, and enable it
sudo dd if=/dev/zero of=/swapfile2 bs=1M count=2048 status=progress
sudo chmod 600 /swapfile2
sudo mkswap /swapfile2
sudo swapon /swapfile2
As with a replacement, use a fully allocated file. Do not use a method that leaves holes, and do not skip the mode-600 permission.
2. Add one boot-time entry
printf '/swapfile2 none swap sw 0 0n' | sudo tee -a /etc/fstab
Before appending, inspect /etc/fstab so you do not add the same line twice. Then verify both active areas:
swapon --show
cat /proc/swaps
free -h
grep -nE 'sswaps' /etc/fstab
Multiple swap areas are supported. The kernel manages them according to its normal swap policy; the total shown by free -h is the combined capacity.
Verify the result and test persistence
Use all three runtime checks after either method:
swapon --show
cat /proc/swaps
free -h
swapon --showshould list the intended path and the expected size.cat /proc/swapsshould show the same active areas from the kernel’s perspective.free -hshould report the increased total swap capacity.
Check the on-disk configuration separately:
grep -nE 'sswaps' /etc/fstab
Keep one valid line per intended area. A reboot test is optional operational validation, but it is the strongest way to confirm boot-time activation. Before rebooting, ensure you have console or recovery access in case a malformed /etc/fstab entry prevents normal startup. After the VPS returns, run the same three runtime checks and inspect /etc/fstab again.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.
A larger total does not mean the kernel will immediately fill it. Swap usage depends on memory demand and kernel policy; an unused area can still be correctly configured.
Filesystem and VPS caveats
Do not create a file with holes
The Ubuntu swapon(8) manpage warns: “You should not use swapon on a file with holes.” A sparse file can appear to have the requested size while not reserving all of its blocks. When the kernel attempts to use an unallocated range, activation may fail or the file may not provide the reliability expected of swap.
The same documentation calls dd and /dev/zero the most portable creation method. Tools such as fallocate can behave differently on ext4, XFS, and copy-on-write filesystems. Ubuntu’s documentation also identifies additional requirements for Btrfs. If the VPS uses Btrfs or another copy-on-write filesystem, follow that filesystem’s documented swap-file requirements rather than assuming a command that works on ext4 will work identically there.
Leave disk headroom
A swap file is ordinary disk consumption from the VPS quota. Monitor the filesystem after creation and keep capacity for logs, package operations, temporary files, and application writes. A host with ample swap but no free space can still fail critical services.
Understand performance limits
Swap is slower than RAM and may share the same virtual disk as your application. Heavy swapping can increase I/O latency and reduce application responsiveness. Treat the new capacity as protection against occasional pressure, not as a substitute for sizing the VPS with adequate RAM.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.If the VPS uses a swap partition
If swapon --show lists a device rather than a file, mkswap can initialize that device and swapon can activate it. The persistent /etc/fstab entry must reference the device path or its configured identifier, not /swapfile.
Expanding an existing partition generally requires changing the partition layout or obtaining additional capacity from the VPS provider. That work can involve provider controls, a recovery environment, backups, and filesystem-specific steps. When free filesystem space is available, creating a new swap file is usually the simpler operational route. Do not overwrite a partition or device unless you have positively identified it as swap and have a recovery plan.
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.
Swappiness is a separate decision
Swap size and swap preference are different settings. Ubuntu’s Swap FAQ records a default swappiness value of 60. Increasing the file does not require changing that value, and a larger area does not automatically justify a different one.
Free tools Windows power users keep installed
One-click scans. No signup required.
Observe memory use and I/O behavior before tuning. A temporary change can be made with sysctl; a deliberate setting should be recorded in an appropriate file under /etc/sysctl.d/ so its purpose is clear and it can be managed consistently. Change one variable at a time and watch application latency, swap-in and swap-out activity, and available memory. If the workload is stable with the default, leave it unchanged.
Troubleshoot common failures
swapoff says there is not enough memory
The active file contains pages that cannot all fit back into RAM or another swap area. Stop nonessential services, reduce workload, or add and activate a second swap file before attempting to remove the original. Do not delete an active file without a successful swapoff.
swapon reports “Invalid argument” or refuses the file
- Confirm that
mkswap /swapfilecompleted successfully. - Check that the file is fully allocated; recreate it with
dd if=/dev/zeroif a sparse or hole-filled file was used. - Verify the filesystem’s rules, especially on Btrfs or other copy-on-write filesystems.
- Check the file path and permissions with
ls -l /swapfile; mode should be 600 and ownership should be root.
The new capacity disappears after reboot
The runtime activation worked, but boot configuration did not. Confirm the exact path and the line /swapfile none swap sw 0 0 (or the corresponding second-file line) in /etc/fstab. Remove typos and duplicate or stale entries, then run swapon --show after reboot.
dd stops with “No space left on device”
Check df -h, remove an inactive incomplete file, and choose a smaller target or add disk capacity. Do not consume the last free blocks merely to reach a nominal swap size.
free -h shows little or no swap in use
That is not necessarily an error. The command reports total and current usage; Linux uses swap only when its memory policy and workload require it. Use swapon --show and /proc/swaps to verify activation independently of current utilization.
When an additional file is no longer needed, disable it before deleting it and remove its persistent entry: Delete only the 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.sudo swapoff /swapfile2
sudo rm /swapfile2
sudoedit /etc/fstab/swapfile2 line, save the file, and verify with swapon --show. The same order—disable, delete, then clean /etc/fstab—prevents boot configuration from pointing at a file that no longer exists.Quick Recap
Final operational checklist
swapon --show; do not guess the filename.free -h and df -h.swapoff before removing the old file.dd, not a hole-filled sparse file.chmod 600, then mkswap, then swapon./etc/fstab line per intended swap area.swapon --show, cat /proc/swaps, and free -h.swappiness tuning separately from changing capacity.

