To disable Transparent Huge Pages (THP) persistently, add transparent_hugepage=never to the Linux kernel command line, regenerate the bootloader configuration using your distribution’s supported method, and reboot. An interactive command such as echo never > /sys/kernel/mm/transparent_hugepage/enabled changes a live system only; it does not establish a complete, boot-time policy.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
The permanent method in brief
Linux reads the transparent_hugepage= option while the kernel starts. The upstream kernel administrator guide documents always, madvise, and never as boot-time defaults for the top-level THP enabled control. For a system-wide default of disabled anonymous THP, use transparent_hugepage=never on the kernel command line.
As an Amazon Associate I earn from qualifying purchases.
- Record the current boot arguments and THP controls.
- Add
transparent_hugepage=neverwithout deleting unrelated kernel options. - Regenerate the bootloader configuration, or use the distribution’s supported kernel-argument tool.
- Reboot.
- Confirm both that the kernel received the option and that the active sysfs policy is
never.
This approach matters because THP policy can affect processes started early in boot. A later write from systemd, a tmpfiles rule, or an administrator’s shell cannot be assumed to have the same timing or coverage as a kernel command-line setting.
Why an echo to sysfs is not a permanent disable
The familiar command below is useful for a live test:
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
echo never > /sys/kernel/mm/transparent_hugepage/enabled
It changes the current kernel’s top-level policy until that policy is replaced or changed again. A reboot starts a new kernel instance, which obtains its boot-time default from the kernel command line and other initialization mechanisms; the previous sysfs write is not retained automatically.
There is also a coverage issue. The Linux kernel documentation explicitly warns that “Setting never in all sysfs THP controls does not disable Transparent Huge Pages globally.” Current kernels can expose more than one anonymous THP size, and file-backed or tmpfs/shmem allocations have separate controls. Therefore, a top-level runtime write is best treated as an experiment or temporary mitigation, not as proof that every THP allocation class is disabled after the next boot.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsInspect the current system before changing it
Capture the existing command line first. This gives you a rollback reference and helps detect whether a bootloader change actually reached the running kernel.
cat /proc/cmdline
cat /sys/kernel/mm/transparent_hugepage/enabled
cat /sys/kernel/mm/transparent_hugepage/defrag 2>/dev/null || true
find /sys/kernel/mm/transparent_hugepage -path '*/hugepages-*/enabled' -o -name shmem_enabled 2>/dev/null
Read the boot arguments
/proc/cmdline is the command line used by the currently running kernel. Save its output before editing any boot configuration. Do not assume that changing a file under /etc changes the entry selected by the bootloader; the running value is the authoritative check after reboot.
Read the top-level policy
The enabled file normally displays choices such as always, madvise, and never. The active choice appears in brackets, for example always madvise [never]. The bracketed value, rather than the order of the words, is the effective setting for that control.
Check defragmentation separately
The defrag file controls how the kernel attempts to obtain contiguous huge pages. It is related to THP behavior but is not a substitute for disabling the THP policy itself. Some kernels or configurations do not expose this file, which is why the inspection command suppresses a missing-file error.
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 reinstallOutdated 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 matchRank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Look for size-specific and shmem controls
The find command identifies per-size enabled files and shmem_enabled controls when the running kernel provides them. Their presence means that the simple top-level view does not describe every allocation class. Keep the output with your change record so you can compare it after reboot.
Add transparent_hugepage=never to the kernel command line
GRUB-based distributions
On a GRUB-based distribution, edit the distribution’s kernel-command-line variable in /etc/default/grub (or the file your distribution designates). Add transparent_hugepage=never inside the existing quoted argument list. Preserve every unrelated option already present; replacing the whole value can remove settings needed for storage, security, virtualization, or console access.
After saving the file, run the bootloader configuration generator documented for that distribution. The generator and its output path are distribution-specific. A change that is made but not regenerated may never reach the boot menu, so treat the generator step as mandatory rather than optional.
Before editing, make a backup of the file or otherwise record the original line. If the machine is remotely administered, arrange a console or recovery path before rebooting in case an unrelated boot argument is accidentally removed.
RHEL 8 with grubby
Red Hat documents this persistent operation for RHEL 8:
sudo grubby --args="transparent_hugepage=never" --update-kernel=DEFAULT
This tells grubby to add the argument to the default kernel entries managed by the system. Use the command on the RHEL installation for which it is documented, and inspect the resulting configuration before rebooting. If your distribution uses a different bootloader manager or release-specific workflow, follow that system’s supported argument-editing tool instead of copying the RHEL command.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Do not create duplicate or conflicting policy arguments
Keep one intentional THP policy. If an existing boot entry already contains a different transparent_hugepage= value, remove or replace it rather than leaving contradictory options in place. Also check that you edited the entry actually selected by the machine. The post-reboot /proc/cmdline check resolves which value the kernel received.
Reboot to apply the policy from early boot
Schedule a reboot after the bootloader change. The kernel command-line parameter is read during kernel initialization, so rebooting is what changes the default for the new boot. A service restart, shell reload, or remount does not apply a new kernel argument.
When early-boot behavior is the reason for disabling THP, the reboot boundary is especially important. A systemd unit or tmpfiles rule runs after the kernel has started and after some userspace processes may already exist. Such mechanisms can still be useful operational fallbacks, but they should not be described as automatically equivalent to a boot parameter.
Verify the result after reboot
Run the same checks after the machine returns:
cat /proc/cmdline
cat /sys/kernel/mm/transparent_hugepage/enabled
cat /sys/kernel/mm/transparent_hugepage/defrag 2>/dev/null || true
find /sys/kernel/mm/transparent_hugepage -path '*/hugepages-*/enabled' -o -name shmem_enabled 2>/dev/null
Pass the command-line test
/proc/cmdline must contain the literal token transparent_hugepage=never. If it is absent, the running kernel did not receive the setting, regardless of what an edited configuration file appears to contain.
Pass the effective-policy test
In the top-level enabled output, confirm that never is the bracketed active value. Inspect any per-size files found on your kernel as well. A system that requires strict coverage of all THP classes needs those additional controls reviewed, not just the top-level file.
Keep evidence for change management
Save the before-and-after command output, the exact bootloader command or configuration change, and the reboot time. This makes it possible to distinguish a policy failure from a later service or kernel change that modifies a runtime control.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Understand newer kernels and multiple THP sizes
Kernel interfaces have expanded beyond a single anonymous THP setting. Newer kernels may expose multiple anonymous THP sizes. The thp_anon= boot parameter can set policy per supported size. When thp_anon= is specified, anonymous THP sizes that are not explicitly configured are implicitly set to never.
This gives administrators a more granular option than the top-level default when a workload needs one particular size policy. If the requirement is simply “no anonymous THP,” the broad transparent_hugepage=never boot setting remains the documented persistent starting point; nevertheless, inspect the per-size files so your verification matches the kernel’s actual interface.
Anonymous memory versus file-backed and shmem memory
Anonymous memory and file-backed memory do not necessarily share one policy control. File-backed and tmpfs/shmem behavior uses shmem_enabled controls, and kernels with multi-size THP can expose per-size shmem controls as well. If your compliance or application requirement covers every allocation class, review each path returned by the inspection command and document the policy shown there.
Do not infer that an anonymous-memory result automatically describes tmpfs or file-backed allocations. The control hierarchy is kernel-version dependent, so the files present on the running host are the correct inventory.
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 →When a systemd or tmpfiles method is appropriate
The RHEL administration guidance documents startup management with systemd unit files as an alternative operational mechanism. A unit can write the relevant sysfs controls during boot, and a tmpfiles rule can provide a similar distribution-managed write. These methods are useful when policy must be managed by an existing configuration-management system or when a platform does not expose the desired bootloader workflow.
They have two limitations:
- They run later than kernel command-line processing, so early userspace processes may start under a different policy.
- They must address every relevant control. Writing only the top-level
enabledfile does not prove that per-size anonymous or shmem controls are covered.
Use a boot parameter when the objective is to prevent the policy from being active from the earliest stage of boot. Choose a service or tmpfiles rule only when its ordering, permissions, and complete set of target controls have been verified for that distribution and kernel.
Best Value
Troubleshoot a setting that returns after reboot
transparent_hugepage=never is missing from /proc/cmdline
- The bootloader configuration may not have been regenerated after editing the source file.
- The machine may have booted a different entry than the one you changed.
- A distribution-managed tool may have overwritten the entry or stored kernel arguments elsewhere.
- The argument may have been added to a non-running kernel rather than the default entry selected at boot.
Return to the distribution’s supported bootloader procedure, preserve the original arguments, and verify the active entry after the next reboot. Do not use the sysfs output alone to diagnose a missing kernel parameter.
The parameter is present, but a control does not show never
First, identify which control is displaying another policy and whether it is a top-level, per-size, or shmem file. The parameter establishes the top-level boot-time default documented by the kernel; newer kernels can expose additional policy dimensions. Review thp_anon= requirements and the shmem_enabled paths when the goal includes every THP allocation class.
Recommended Free Tools
A startup script appears to undo the setting
Search the system’s service and tmpfiles management for writes to the THP sysfs paths. A later runtime write can change what the files display even though the kernel command line is correct. Keep the boot parameter as the baseline, then correct or remove the conflicting startup action and reboot or reapply the intended runtime policy according to the service’s ordering.
The host has several installed kernels
Ensure the argument is attached to the entry that will actually boot. On RHEL 8, the documented grubby command uses --update-kernel=DEFAULT; other distributions may use a generator that applies defaults differently. Confirm the selected entry by checking /proc/cmdline after reboot rather than assuming all installed kernels inherited the change.
Rollback: restore the previous THP policy
Use the same bootloader mechanism that added the parameter. Remove transparent_hugepage=never from the relevant kernel entries, regenerate configuration when the distribution requires it, and reboot. If you used a tool that edits kernel entries directly, use its corresponding removal operation rather than manually editing an unrelated file.
After reboot, verify the result explicitly:
- Check that
/proc/cmdlineno longer containstransparent_hugepage=never. - Read
/sys/kernel/mm/transparent_hugepage/enabledand note the bracketed active policy. - Inspect per-size and shmem controls again if they were present before the change.
Removing the parameter restores the kernel or distribution default; it does not guarantee a particular policy such as always or madvise unless you set that policy explicitly through the supported boot configuration.
Free tools Windows power users keep installed
One-click scans. No signup required.
Performance and operational expectations
Disabling THP is a policy decision, not a universal performance fix. The available evidence does not establish one latency or throughput percentage that applies to all workloads, kernels, or hardware. Measure the workload that motivated the change, and record the kernel version, allocation pattern, and workload configuration alongside the result.
Use the persistent boot parameter when you need deterministic policy from kernel startup, and use the sysfs controls for controlled runtime experiments or narrowly scoped operational changes. Whichever approach you choose, verify the command line and the effective controls on the running host; a configuration file or one successful shell command is not sufficient evidence by itself.
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.




