Saya menggunakan mongodb 3.0 dan saya menemukan peringatan:
MongoDB shell version: 3.0.0
connecting to: test
Server has startup warnings:
2015-03-13T16:28:29.405+0800 I CONTROL [initandlisten]
2015-03-13T16:28:29.406+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-03-13T16:28:29.406+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-03-13T16:28:29.406+0800 I CONTROL [initandlisten]
2015-03-13T16:28:29.407+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-03-13T16:28:29.407+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-03-13T16:28:29.407+0800 I CONTROL [initandlisten]
~# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never
~# cat /sys/kernel/mm/transparent_hugepage/defrag
[always] madvise never
Saya mencoba menggunakan gema, tetapi itu tidak permanen, setelah reboot itu akan diatur ulang.
echo never > /sys/kernel/mm/transparent_hugepage/defrag
Bagaimana cara saya memodifikasi /sys/kernel/mm/transparent_hugepage/enabled
secara permanen?