October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk9 min

How to Permanently Disable Transparent Huge Pages on Linux

A runtime echo to the THP sysfs file does not survive reboot. Add transparent_hugepage=never to the kernel command line, regenerate your bootloader configuration, reboot, and verify both /proc/cmdline and the active sysfs policy.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Record the current boot arguments and THP controls.
  2. Add transparent_hugepage=never without deleting unrelated kernel options.
  3. Regenerate the bootloader configuration, or use the distribution’s supported kernel-argument tool.
  4. Reboot.
  5. 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
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inspect 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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 enabled file 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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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:

  1. Check that /proc/cmdline no longer contains transparent_hugepage=never.
  2. Read /sys/kernel/mm/transparent_hugepage/enabled and note the bracketed active policy.
  3. 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.