2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Transparent Huge Pageの無効化

Last updated at Posted at 2021-01-17

THP(Transparent Huge Page)とは

THPはOSが動的にHugePageを割り当てる機能。

ページとは

メモリは、ページという単位で管理を行う。
1ページの容量は4KBとなる。

HugePageとは

HugePageは、通常のページに比べて大きな容量を持つページ。
HugePageの1ページの容量は2MB。

HugePageを利用するメリットとして、

1ページの容量が大きいので、ページ数を削減される
→ ページ表エントリへのアクセスする回数が減る
→ 性能向上を図ることが可能となる。


THP(Transparent Huge Page)とは

THPはOSが動的にHugePageを割り当てる機能。

THPではOSにより自動的に大規模ページが、
プロセスに割り当てられるため、大規模ページは手動で予約する必要がない

Huge page サイズは下記で確認可能

$ cat /proc/meminfo | grep "Hugepagesize"
$ echo never > /sys/kernel/mm/transparent_hugepage/enabled

redis.log

# 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.
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?