-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hugepage support for LCOW #1118
Hugepage support for LCOW #1118
Conversation
3ffee97
to
50866a2
Compare
50866a2
to
99e5783
Compare
Do you know if we have to set |
I think we want to do something like: "host_path": “hugepages://2mb/somepathname" where sourcepathinuvm/hugepages/2mb is where hugetlbfs is mounted, and somepathname is a subpath under that mount. This will allow us to better control propagation between containers. Otherwise with the current route, every container that requests hugepages of size 2mb will see any files (but potentially not mountpoints depending on configuration) under the 2mb sandbox source path. |
I just did this to be explicit, so that in future if we add support for different pages at the same time, it is obvious, Let me know if you want me to remove it. |
|
Oddly enough some of the bridge gcs tests are failing here |
Kathryn, reran the tests, and they passed. |
e2a5856
to
8761d81
Compare
They are passing now, after pulling in latest changes. |
8761d81
to
f7e1759
Compare
This needs to get rebased to get Kathryns recent fixes |
f7e1759
to
e3f6ef1
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see this design follows what was discussed, lgtm. Just go related comments
e3f6ef1
to
f208d05
Compare
Still lgtm |
f208d05
to
5ad017e
Compare
Signed-off-by: Vivek Aggarwal <[email protected]>
5ad017e
to
6fba53b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Related work items: microsoft#1062, microsoft#1087, microsoft#1089, microsoft#1095, microsoft#1104, microsoft#1112, microsoft#1117, microsoft#1118, microsoft#1125, microsoft#1137, microsoft#1139, microsoft#1140, microsoft#1141, microsoft#1142, microsoft#1143, microsoft#1145, microsoft#1146, microsoft#1150, microsoft#1151, microsoft#1153, microsoft#1154, microsoft#1155, microsoft#1156, microsoft#1157, microsoft#1158, microsoft#1159, microsoft#1161, microsoft#1162, microsoft#1163, microsoft#1164, microsoft#1165, microsoft#1166, microsoft#1167, microsoft#1168, microsoft#1169, microsoft#1171, microsoft#1172, microsoft#1173, microsoft#1174, microsoft#1178
Hugepage support for LCOW
This adds hugepages support for LCOW.
A hugetlbfs drive can be mounted inside a LCOW. This is backed by a location in UVM. Currently, linux kernel shipped with containerd only supports hugepage size of 2M.
In order to specify a container path is a hugepage mount, hostpath needs to be specified as hugepages://2M.
In order for container to use hugepage successfully, it is expected UVM will be created appropriate KernelOptions annotation.
"io.microsoft.virtualmachine.lcow.kernelbootoptions" : "hugepagesz=2M hugepages=10"
UVM also has to be created with sufficient memory to host desired number of hugepages.
Ex:
"io.microsoft.virtualmachine.computetopology.memory.sizeinmb": "2048",
"io.microsoft.virtualmachine.lcow.kernelbootoptions" : "hugepagesz=2M hugepages=10"
In order to realize the performance of using hugepages inside the LCOW, memory backing the UVM has to ensured to use an approriate page size. The default page for physical memory backed UVM is 2MB. Hence, to ensure performance with using hugepage of size MB, UVM should be physcial memory backed.
"io.microsoft.virtualmachine.fullyphysicallybacked": "true"
Verification: Adhoc testing using updated containerd binaries/linux kernel /container image with a test app that tries to huge page.
Newly added functional test also passes.