Issue with Hugepage reservation in linux

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have reserved hugepages for my process using below commands:
#echo 64 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
#mkdir -p /mnt/huge && mount -t hugetlbfs nodev /mnt/huge .
And I have placed it in rc.local file.
After machine reboot, huge pages reserved successfully and /mnt/huge created.
But before my process startups, I could see 21 hugepages are not available for reservation.
Below command output:
# cat /proc/meminfo | grep Huge
HugePages_Total: 64
HugePages_Free: 43
HugePages_Rsvd: 43
HugePages_Surp: 0
Hugepagesize: 2048 kB
And no results for the below commands:
# lsof |grep /mnt/huge
[root@CLA-0(11) /root]
Then I tried to free hugepages ...
# echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
No error message displayed. But below command output tells no change ..
# cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
0
But I could see if we echo > 64 it updates nr_hugepages. Also tested with other numbers, it only updates if value is greater then current value in nr_hugepages.
I am looking for below clarification in this site:
- 43 hugepages are free , who requested 21 hugepages allocation out of 64.
- Why
echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepageis not updating nr_hugepages
Linux Kernel
# cat /proc/version
Linux version 2.6.34.13-WR4.3.x86_64_fbsa_standard-00038-gc4b8cb8 (gcc version 4.4.1 (Wind River Linux Sourcery G++ 4.4a-431) ) #1 SMP Wed Jan 8 20:40:41 EET 2014
linux linux-kernel
migrated from stackoverflow.com Feb 3 '14 at 22:12
This question came from our site for professional and enthusiast programmers.
add a comment |Â
up vote
0
down vote
favorite
I have reserved hugepages for my process using below commands:
#echo 64 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
#mkdir -p /mnt/huge && mount -t hugetlbfs nodev /mnt/huge .
And I have placed it in rc.local file.
After machine reboot, huge pages reserved successfully and /mnt/huge created.
But before my process startups, I could see 21 hugepages are not available for reservation.
Below command output:
# cat /proc/meminfo | grep Huge
HugePages_Total: 64
HugePages_Free: 43
HugePages_Rsvd: 43
HugePages_Surp: 0
Hugepagesize: 2048 kB
And no results for the below commands:
# lsof |grep /mnt/huge
[root@CLA-0(11) /root]
Then I tried to free hugepages ...
# echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
No error message displayed. But below command output tells no change ..
# cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
0
But I could see if we echo > 64 it updates nr_hugepages. Also tested with other numbers, it only updates if value is greater then current value in nr_hugepages.
I am looking for below clarification in this site:
- 43 hugepages are free , who requested 21 hugepages allocation out of 64.
- Why
echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepageis not updating nr_hugepages
Linux Kernel
# cat /proc/version
Linux version 2.6.34.13-WR4.3.x86_64_fbsa_standard-00038-gc4b8cb8 (gcc version 4.4.1 (Wind River Linux Sourcery G++ 4.4a-431) ) #1 SMP Wed Jan 8 20:40:41 EET 2014
linux linux-kernel
migrated from stackoverflow.com Feb 3 '14 at 22:12
This question came from our site for professional and enthusiast programmers.
Please fix the format... Oh, god! my eyes!
â opalenzuela
Jan 29 '14 at 14:50
i am able to read ... please let me know which line needs fix ??
â user3249302
Jan 30 '14 at 6:30
Marc B already did the fixing...
â opalenzuela
Jan 30 '14 at 8:42
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have reserved hugepages for my process using below commands:
#echo 64 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
#mkdir -p /mnt/huge && mount -t hugetlbfs nodev /mnt/huge .
And I have placed it in rc.local file.
After machine reboot, huge pages reserved successfully and /mnt/huge created.
But before my process startups, I could see 21 hugepages are not available for reservation.
Below command output:
# cat /proc/meminfo | grep Huge
HugePages_Total: 64
HugePages_Free: 43
HugePages_Rsvd: 43
HugePages_Surp: 0
Hugepagesize: 2048 kB
And no results for the below commands:
# lsof |grep /mnt/huge
[root@CLA-0(11) /root]
Then I tried to free hugepages ...
# echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
No error message displayed. But below command output tells no change ..
# cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
0
But I could see if we echo > 64 it updates nr_hugepages. Also tested with other numbers, it only updates if value is greater then current value in nr_hugepages.
I am looking for below clarification in this site:
- 43 hugepages are free , who requested 21 hugepages allocation out of 64.
- Why
echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepageis not updating nr_hugepages
Linux Kernel
# cat /proc/version
Linux version 2.6.34.13-WR4.3.x86_64_fbsa_standard-00038-gc4b8cb8 (gcc version 4.4.1 (Wind River Linux Sourcery G++ 4.4a-431) ) #1 SMP Wed Jan 8 20:40:41 EET 2014
linux linux-kernel
I have reserved hugepages for my process using below commands:
#echo 64 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
#mkdir -p /mnt/huge && mount -t hugetlbfs nodev /mnt/huge .
And I have placed it in rc.local file.
After machine reboot, huge pages reserved successfully and /mnt/huge created.
But before my process startups, I could see 21 hugepages are not available for reservation.
Below command output:
# cat /proc/meminfo | grep Huge
HugePages_Total: 64
HugePages_Free: 43
HugePages_Rsvd: 43
HugePages_Surp: 0
Hugepagesize: 2048 kB
And no results for the below commands:
# lsof |grep /mnt/huge
[root@CLA-0(11) /root]
Then I tried to free hugepages ...
# echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
No error message displayed. But below command output tells no change ..
# cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
0
But I could see if we echo > 64 it updates nr_hugepages. Also tested with other numbers, it only updates if value is greater then current value in nr_hugepages.
I am looking for below clarification in this site:
- 43 hugepages are free , who requested 21 hugepages allocation out of 64.
- Why
echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepageis not updating nr_hugepages
Linux Kernel
# cat /proc/version
Linux version 2.6.34.13-WR4.3.x86_64_fbsa_standard-00038-gc4b8cb8 (gcc version 4.4.1 (Wind River Linux Sourcery G++ 4.4a-431) ) #1 SMP Wed Jan 8 20:40:41 EET 2014
linux linux-kernel
linux linux-kernel
edited Feb 8 '14 at 7:27
Timo
4,6951726
4,6951726
asked Jan 29 '14 at 14:49
Sharath
12
12
migrated from stackoverflow.com Feb 3 '14 at 22:12
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Feb 3 '14 at 22:12
This question came from our site for professional and enthusiast programmers.
Please fix the format... Oh, god! my eyes!
â opalenzuela
Jan 29 '14 at 14:50
i am able to read ... please let me know which line needs fix ??
â user3249302
Jan 30 '14 at 6:30
Marc B already did the fixing...
â opalenzuela
Jan 30 '14 at 8:42
add a comment |Â
Please fix the format... Oh, god! my eyes!
â opalenzuela
Jan 29 '14 at 14:50
i am able to read ... please let me know which line needs fix ??
â user3249302
Jan 30 '14 at 6:30
Marc B already did the fixing...
â opalenzuela
Jan 30 '14 at 8:42
Please fix the format... Oh, god! my eyes!
â opalenzuela
Jan 29 '14 at 14:50
Please fix the format... Oh, god! my eyes!
â opalenzuela
Jan 29 '14 at 14:50
i am able to read ... please let me know which line needs fix ??
â user3249302
Jan 30 '14 at 6:30
i am able to read ... please let me know which line needs fix ??
â user3249302
Jan 30 '14 at 6:30
Marc B already did the fixing...
â opalenzuela
Jan 30 '14 at 8:42
Marc B already did the fixing...
â opalenzuela
Jan 30 '14 at 8:42
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
I haven't found a perfect answer to this problem but you can obtain usable space using the following
#!/bin/sh
#
echo "Re-establishing and defragmenting hugepages "
sysctl -p
hugeadm --pool-pages-min=DEFAULT:+[page-count] âÂÂadd-temp-swap=400
echo â âÂÂ
echo âÂÂUpdated hugepages âÂÂ
cat /proc/meminfo |grep HugePage
This will consolidate the reserved pages into one place using a swap file of 400 pages (in this case) and attempt to ensure / append the required number available pages specified in [page-count]. The script assumes you have defined the desired number of initial pages in /etc/sysctl.conf
More information in the manual entry for hugeadm
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I haven't found a perfect answer to this problem but you can obtain usable space using the following
#!/bin/sh
#
echo "Re-establishing and defragmenting hugepages "
sysctl -p
hugeadm --pool-pages-min=DEFAULT:+[page-count] âÂÂadd-temp-swap=400
echo â âÂÂ
echo âÂÂUpdated hugepages âÂÂ
cat /proc/meminfo |grep HugePage
This will consolidate the reserved pages into one place using a swap file of 400 pages (in this case) and attempt to ensure / append the required number available pages specified in [page-count]. The script assumes you have defined the desired number of initial pages in /etc/sysctl.conf
More information in the manual entry for hugeadm
add a comment |Â
up vote
0
down vote
I haven't found a perfect answer to this problem but you can obtain usable space using the following
#!/bin/sh
#
echo "Re-establishing and defragmenting hugepages "
sysctl -p
hugeadm --pool-pages-min=DEFAULT:+[page-count] âÂÂadd-temp-swap=400
echo â âÂÂ
echo âÂÂUpdated hugepages âÂÂ
cat /proc/meminfo |grep HugePage
This will consolidate the reserved pages into one place using a swap file of 400 pages (in this case) and attempt to ensure / append the required number available pages specified in [page-count]. The script assumes you have defined the desired number of initial pages in /etc/sysctl.conf
More information in the manual entry for hugeadm
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I haven't found a perfect answer to this problem but you can obtain usable space using the following
#!/bin/sh
#
echo "Re-establishing and defragmenting hugepages "
sysctl -p
hugeadm --pool-pages-min=DEFAULT:+[page-count] âÂÂadd-temp-swap=400
echo â âÂÂ
echo âÂÂUpdated hugepages âÂÂ
cat /proc/meminfo |grep HugePage
This will consolidate the reserved pages into one place using a swap file of 400 pages (in this case) and attempt to ensure / append the required number available pages specified in [page-count]. The script assumes you have defined the desired number of initial pages in /etc/sysctl.conf
More information in the manual entry for hugeadm
I haven't found a perfect answer to this problem but you can obtain usable space using the following
#!/bin/sh
#
echo "Re-establishing and defragmenting hugepages "
sysctl -p
hugeadm --pool-pages-min=DEFAULT:+[page-count] âÂÂadd-temp-swap=400
echo â âÂÂ
echo âÂÂUpdated hugepages âÂÂ
cat /proc/meminfo |grep HugePage
This will consolidate the reserved pages into one place using a swap file of 400 pages (in this case) and attempt to ensure / append the required number available pages specified in [page-count]. The script assumes you have defined the desired number of initial pages in /etc/sysctl.conf
More information in the manual entry for hugeadm
edited Sep 25 '14 at 2:05
HalosGhost
3,57792035
3,57792035
answered Sep 25 '14 at 1:59
redger
1
1
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f112372%2fissue-with-hugepage-reservation-in-linux%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Please fix the format... Oh, god! my eyes!
â opalenzuela
Jan 29 '14 at 14:50
i am able to read ... please let me know which line needs fix ??
â user3249302
Jan 30 '14 at 6:30
Marc B already did the fixing...
â opalenzuela
Jan 30 '14 at 8:42