Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Navigation

    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    SOLVED Please disable transparent hugepage

    Support
    redis server
    4
    16
    163
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JOduMonT
      JOduMonT last edited by

      would be nice to disable the THP

      error from nextcloud

      Jun 24 11:56:39 14:M 24 Jun 04:56:39.893 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
      

      more info about why it should be considered

      • https://stackoverflow.com/questions/42591511/when-to-turn-off-transparent-huge-pages-for-redis
      • https://redis.io/topics/latency
      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        In this case we have to do this for the whole server. Not sure yet if that is a good idea or not, since there are various different payloads. However from what I've read so far, especially databases, not just redis, could profit. As also mentioned for mongodb at https://docs.mongodb.com/manual/tutorial/transparent-huge-pages/

        That being said in the servers I have checked now, the default actually seems to be madvise for THP, which according to https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/performance_tuning_guide/sect-red_hat_enterprise_linux-performance_tuning_guide-configuring_transparent_huge_pages is a much better option as the process can control the behavior on its own.

        I might be wrong but it seems the recommendation for option never is a bit outdated by now?

        JOduMonT 1 Reply Last reply Reply Quote 1
        • JOduMonT
          JOduMonT @nebulon last edited by

          @nebulon said in Please disable transparent hugepage:

          I might be wrong but it seems the recommendation for option never is a bit outdated by now?

          hopefully,

          thank for your research, I forget to look before.

          I'll forward these to nextcloud, maybe they have to update their warning

          the first time I eared about it in a talk from Brendan Gregg (Netflix) and I was full of hope by using RIP CoreOS

          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by

            Thanks, if you forward that information publicly and have a link, it would be great if you can put it here so we can also follow such a thread.

            JOduMonT 1 Reply Last reply Reply Quote 0
            • girish
              girish Staff last edited by girish

              This warning is coming from redis and not from nextcloud (so I don't this the nextcloud devs can help)

              1 Reply Last reply Reply Quote 1
              • JOduMonT
                JOduMonT @nebulon last edited by

                @nebulon said in Please disable transparent hugepage:

                if you forward that information publicly and have a link

                I know I do play renagate here
                https://github.com/redis/redis-rcp/issues/22
                maxresdefault.jpg

                1 Reply Last reply Reply Quote 1
                • girish
                  girish Staff last edited by

                  Thanks for reporting upstream 🙂 Let's wait for their response.

                  1 Reply Last reply Reply Quote 0
                  • JOduMonT
                    JOduMonT last edited by

                    FYI, whonix also recommend to disable HugePage as it is possible to tamper the data on transit
                    https://www.whonix.org/wiki/KVM#HugePages

                    1 Reply Last reply Reply Quote 0
                    • girish
                      girish Staff last edited by

                      This is disabled in https://git.cloudron.io/cloudron/box/-/commit/213ce114e32e6a880506e24a79b8dc1d7d2d0784

                      J 1 Reply Last reply Reply Quote 2
                      • J
                        johan @girish last edited by

                        @girish Trying a new install from scratch today (Ubuntu 20.04) and cloudron-disable-thp is stuck:

                        Dec 07 18:18:22 cloudron systemd[1]: Starting Disable Transparent Huge Pages (THP)...
                        Dec 07 18:18:22 cloudron sh[3229]: tee: /sys/kernel/mm/transparent_hugepage/enabled: No such file or directory
                        Dec 07 18:18:22 cloudron systemd[1]: cloudron-disable-thp.service: Main process exited, code=exited, status=1/FAILURE
                        Dec 07 18:18:22 cloudron systemd[1]: cloudron-disable-thp.service: Failed with result 'exit-code'.
                        Dec 07 18:18:22 cloudron systemd[1]: Failed to start Disable Transparent Huge Pages (THP).
                        
                        girish 1 Reply Last reply Reply Quote 0
                        • girish
                          girish Staff @johan last edited by

                          @johan Which VPS provider is this? Looks like that file is missing, maybe that feature was not complied in the kernel.

                          J 1 Reply Last reply Reply Quote 0
                          • J
                            johan @girish last edited by

                            @girish I'm using a Scaleway DEV1-M.

                            J 1 Reply Last reply Reply Quote 0
                            • J
                              johan @johan last edited by

                              @johan Don't know if that's helpful:

                              uname -r
                              5.4.0-1028-kvm
                              
                              girish 2 Replies Last reply Reply Quote 0
                              • girish
                                girish Staff @johan last edited by

                                @johan I can reproduce the problem on scaleway, thanks. It seems THP is disabled in the kernel, so the code has to check if the directory exists. Will fix this.

                                1 Reply Last reply Reply Quote 2
                                • girish
                                  girish Staff @johan last edited by

                                  @johan I have fixed this now - https://git.cloudron.io/cloudron/box/-/commit/f497d5d30929584f5c312a736290c6697c9965d2 . To follow up about the other thread, after you install 5.6.3 and are up and running, do not update to 6.0! Because you will hit this THP issue again on scaleway if you update. We are making 6.0.1, but it will take till end of today since our CI takes forever...

                                  J 1 Reply Last reply Reply Quote 2
                                  • J
                                    johan @girish last edited by johan

                                    As I said on the other thread I seem to have managed to install cloudron on Ubuntu 20.04 LTS by following your advice to use ./cloudron-setup --version 5.6.3. I've disabled automatic upgrades and I'll wait a bit to upgrade to version 6.
                                    All is good!

                                    1 Reply Last reply Reply Quote 1
                                    • First post
                                      Last post