Skip to contentSkip to conversation

questions about hugetlb usage

DISCUSSION Ma Shimiao 2 participants 3 messages Apr 30, 2015 2 messages not in the archive cgroup

lore
Share & tools
lore

Ma Shimiao

author
#0 lore raw

Hello,

I'm new to cgroups.
I'm not sure whether this is the right place to ask questions about cgroups. If not, I will be very sorry for disturbing.

Recently, I'm researching the usage of hugetlb.
I have got a problem, but don't know why and how to solve it.

# cat /proc/meminfo |grep -i huge
AnonHugePages:   1894400 kB
HugePages_Total:     192
HugePages_Free:      188
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
# cat /sys/fs/cgroup/hugetlb/hugetlb.2MB.limit_in_bytes 
9223372036854771712
# cat /sys/fs/cgroup/hugetlb/hugetlb.2MB.max_usage_in_bytes 
8388608
# cat /sys/fs/cgroup/hugetlb/hugetlb.2MB.usage_in_bytes 
8388608
# echo 10240000000000 > /sys/fs/cgroup/hugetlb/hugetlb.2MB.limit_in_bytes 
-bash: echo: write error: Invalid argument

It seems I cant write values to hugetlb.2MB.limit_in_bytes Could anyone give me some advice?
Thanks very much.

Signature · 3 lines
Ma Shimiao
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
#2 lore raw
In reply to a message not in the archive
Quoted 25 lines · Ma Shimiao

Hello,

I'm new to cgroups.
I'm not sure whether this is the right place to ask questions about cgroups. If not, I will be very sorry for disturbing.

Recently, I'm researching the usage of hugetlb.
I have got a problem, but don't know why and how to solve it.

# cat /proc/meminfo |grep -i huge
AnonHugePages:   1894400 kB
HugePages_Total:     192
HugePages_Free:      188
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
# cat /sys/fs/cgroup/hugetlb/hugetlb.2MB.limit_in_bytes 
9223372036854771712
# cat /sys/fs/cgroup/hugetlb/hugetlb.2MB.max_usage_in_bytes 
8388608
# cat /sys/fs/cgroup/hugetlb/hugetlb.2MB.usage_in_bytes 
8388608
# echo 10240000000000 > /sys/fs/cgroup/hugetlb/hugetlb.2MB.limit_in_bytes 
-bash: echo: write error: Invalid argument
Quoted 4 lines

It seems I cant write values to hugetlb.2MB.limit_in_bytes Could anyone give me some advice?
Thanks very much.

Looks like you were trying to write to the file in root cgroup, which is forbidden.

author
#4 lore raw
In reply to a message not in the archive
Quoted 26 lines · Zefan Li
Quoted 25 lines · Ma Shimiao

Hello,

I'm new to cgroups.
I'm not sure whether this is the right place to ask questions about cgroups. If not, I will be very sorry for disturbing.

Recently, I'm researching the usage of hugetlb.
I have got a problem, but don't know why and how to solve it.

# cat /proc/meminfo |grep -i huge
AnonHugePages:   1894400 kB
HugePages_Total:     192
HugePages_Free:      188
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
# cat /sys/fs/cgroup/hugetlb/hugetlb.2MB.limit_in_bytes 
9223372036854771712
# cat /sys/fs/cgroup/hugetlb/hugetlb.2MB.max_usage_in_bytes 
8388608
# cat /sys/fs/cgroup/hugetlb/hugetlb.2MB.usage_in_bytes 
8388608
# echo 10240000000000 > /sys/fs/cgroup/hugetlb/hugetlb.2MB.limit_in_bytes 
-bash: echo: write error: Invalid argument
Quoted 7 lines
Quoted 4 lines

It seems I cant write values to hugetlb.2MB.limit_in_bytes Could anyone give me some advice?
Thanks very much.

Looks like you were trying to write to the file in root cgroup, which is forbidden.

Ah...
Tested. Really it is.
Thanks.

Quoted 3 lines

.

Signature · 3 lines
Ma Shimiao
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)