ฉันใช้ mongodb 3.0 และพบคำเตือน:
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
ฉันพยายามใช้ echo แต่มันไม่ถาวรหลังจากรีบูตมันจะถูกรีเซ็ต
echo never > /sys/kernel/mm/transparent_hugepage/defrag
ฉันจะแก้ไข/sys/kernel/mm/transparent_hugepage/enabled
อย่างถาวรได้อย่างไร