€•i:Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ9/translations/zh_CN/arch/x86/x86_64/fake-numa-for-cpusets”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ9/translations/zh_TW/arch/x86/x86_64/fake-numa-for-cpusets”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ9/translations/it_IT/arch/x86/x86_64/fake-numa-for-cpusets”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ9/translations/ja_JP/arch/x86/x86_64/fake-numa-for-cpusets”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ9/translations/ko_KR/arch/x86/x86_64/fake-numa-for-cpusets”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ9/translations/pt_BR/arch/x86/x86_64/fake-numa-for-cpusets”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ9/translations/sp_SP/arch/x86/x86_64/fake-numa-for-cpusets”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒS/var/lib/git/docbuild/linux/Documentation/arch/x86/x86_64/fake-numa-for-cpusets.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒFake NUMA For CPUSets”h]”hŒFake NUMA For CPUSets”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ field_list”“”)”}”(hhh]”hŒfield”“”)”}”(hhh]”(hŒ field_name”“”)”}”(hŒAuthor”h]”hŒAuthor”…””}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhhäh³hÇh´KubhŒ field_body”“”)”}”(hŒ,David Rientjes ”h]”hŒ paragraph”“”)”}”(hŒ+David Rientjes ”h]”(hŒDavid Rientjes <”…””}”(hhÿh²hh³Nh´NubhŒ reference”“”)”}”(hŒrientjes@cs.washington.edu”h]”hŒrientjes@cs.washington.edu”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œ!mailto:rientjes@cs.washington.edu”uh1jhhÿubhŒ>”…””}”(hhÿh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´Khhùubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hhäubeh}”(h]”h ]”h"]”h$]”h&]”uh1hâh³hÇh´Khhßh²hubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhhÊh²hh³hÇh´Kubhþ)”}”(hŒ3Using numa=fake and CPUSets for Resource Management”h]”hŒ3Using numa=fake and CPUSets for Resource Management”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K hhÊh²hubhþ)”}”(hX…This document describes how the numa=fake x86_64 command-line option can be used in conjunction with cpusets for coarse memory management. Using this feature, you can create fake NUMA nodes that represent contiguous chunks of memory and assign them to cpusets and their attached tasks. This is a way of limiting the amount of system memory that are available to a certain class of tasks.”h]”hX…This document describes how the numa=fake x86_64 command-line option can be used in conjunction with cpusets for coarse memory management. Using this feature, you can create fake NUMA nodes that represent contiguous chunks of memory and assign them to cpusets and their attached tasks. This is a way of limiting the amount of system memory that are available to a certain class of tasks.”…””}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K hhÊh²hubhþ)”}”(hXOFor more information on the features of cpusets, see Documentation/admin-guide/cgroup-v1/cpusets.rst. There are a number of different configurations you can use for your needs. For more information on the numa=fake command line option and its various ways of configuring fake nodes, see Documentation/admin-guide/kernel-parameters.txt”h]”hXOFor more information on the features of cpusets, see Documentation/admin-guide/cgroup-v1/cpusets.rst. There are a number of different configurations you can use for your needs. For more information on the numa=fake command line option and its various ways of configuring fake nodes, see Documentation/admin-guide/kernel-parameters.txt”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KhhÊh²hubhþ)”}”(hX‡For the purposes of this introduction, we'll assume a very primitive NUMA emulation setup of "numa=fake=4*512,". This will split our system memory into four equal chunks of 512M each that we can now use to assign to cpusets. As you become more familiar with using this combination for resource control, you'll determine a better setup to minimize the number of nodes you have to deal with.”h]”hXFor the purposes of this introduction, we’ll assume a very primitive NUMA emulation setup of “numa=fake=4*512,â€. This will split our system memory into four equal chunks of 512M each that we can now use to assign to cpusets. As you become more familiar with using this combination for resource control, you’ll determine a better setup to minimize the number of nodes you have to deal with.”…””}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KhhÊh²hubhþ)”}”(hŒPA machine may be split as follows with "numa=fake=4*512," as reported by dmesg::”h]”hŒSA machine may be split as follows with “numa=fake=4*512,†as reported by dmesg:”…””}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KhhÊh²hubhŒ literal_block”“”)”}”(hXcFaking node 0 at 0000000000000000-0000000020000000 (512MB) Faking node 1 at 0000000020000000-0000000040000000 (512MB) Faking node 2 at 0000000040000000-0000000060000000 (512MB) Faking node 3 at 0000000060000000-0000000080000000 (512MB) ... On node 0 totalpages: 130975 On node 1 totalpages: 131072 On node 2 totalpages: 131072 On node 3 totalpages: 131072”h]”hXcFaking node 0 at 0000000000000000-0000000020000000 (512MB) Faking node 1 at 0000000020000000-0000000040000000 (512MB) Faking node 2 at 0000000040000000-0000000060000000 (512MB) Faking node 3 at 0000000060000000-0000000080000000 (512MB) ... On node 0 totalpages: 130975 On node 1 totalpages: 131072 On node 2 totalpages: 131072 On node 3 totalpages: 131072”…””}”hj}sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j{h³hÇh´K hhÊh²hubhþ)”}”(hŒÒNow following the instructions for mounting the cpusets filesystem from Documentation/admin-guide/cgroup-v1/cpusets.rst, you can assign fake nodes (i.e. contiguous memory address spaces) to individual cpusets::”h]”hŒÑNow following the instructions for mounting the cpusets filesystem from Documentation/admin-guide/cgroup-v1/cpusets.rst, you can assign fake nodes (i.e. contiguous memory address spaces) to individual cpusets:”…””}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K*hhÊh²hubj|)”}”(hX[root@xroads /]# mkdir exampleset [root@xroads /]# mount -t cpuset none exampleset [root@xroads /]# mkdir exampleset/ddset [root@xroads /]# cd exampleset/ddset [root@xroads /exampleset/ddset]# echo 0-1 > cpus [root@xroads /exampleset/ddset]# echo 0-1 > mems”h]”hX[root@xroads /]# mkdir exampleset [root@xroads /]# mount -t cpuset none exampleset [root@xroads /]# mkdir exampleset/ddset [root@xroads /]# cd exampleset/ddset [root@xroads /exampleset/ddset]# echo 0-1 > cpus [root@xroads /exampleset/ddset]# echo 0-1 > mems”…””}”hj™sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j{h³hÇh´K.hhÊh²hubhþ)”}”(hŒeNow this cpuset, 'ddset', will only allowed access to fake nodes 0 and 1 for memory allocations (1G).”h]”hŒiNow this cpuset, ‘ddset’, will only allowed access to fake nodes 0 and 1 for memory allocations (1G).”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K5hhÊh²hubhþ)”}”(hŒˆYou can now assign tasks to these cpusets to limit the memory resources available to them according to the fake nodes assigned as mems::”h]”hŒ‡You can now assign tasks to these cpusets to limit the memory resources available to them according to the fake nodes assigned as mems:”…””}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K8hhÊh²hubj|)”}”(hŒƒ[root@xroads /exampleset/ddset]# echo $$ > tasks [root@xroads /exampleset/ddset]# dd if=/dev/zero of=tmp bs=1024 count=1G [1] 13425”h]”hŒƒ[root@xroads /exampleset/ddset]# echo $$ > tasks [root@xroads /exampleset/ddset]# dd if=/dev/zero of=tmp bs=1024 count=1G [1] 13425”…””}”hjÃsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j{h³hÇh´K;hhÊh²hubhþ)”}”(hŒæNotice the difference between the system memory usage as reported by /proc/meminfo between the restricted cpuset case above and the unrestricted case (i.e. running the same 'dd' command without assigning it to a fake NUMA cpuset):”h]”hŒêNotice the difference between the system memory usage as reported by /proc/meminfo between the restricted cpuset case above and the unrestricted case (i.e. running the same ‘dd’ command without assigning it to a fake NUMA cpuset):”…””}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K?hhÊh²hubhŒ block_quote”“”)”}”(hX======== ============ ========== Name Unrestricted Restricted ======== ============ ========== MemTotal 3091900 kB 3091900 kB MemFree 42113 kB 1513236 kB ======== ============ ========== ”h]”hŒtable”“”)”}”(hhh]”hŒtgroup”“”)”}”(hhh]”(hŒcolspec”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jïhjìubjð)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1jïhjìubjð)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1jïhjìubhŒthead”“”)”}”(hhh]”hŒrow”“”)”}”(hhh]”(hŒentry”“”)”}”(hhh]”hþ)”}”(hŒName”h]”hŒName”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KEhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hhh]”hþ)”}”(hŒ Unrestricted”h]”hŒ Unrestricted”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KEhj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hhh]”hþ)”}”(hŒ Restricted”h]”hŒ Restricted”…””}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KEhjIubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjìubhŒtbody”“”)”}”(hhh]”(j)”}”(hhh]”(j)”}”(hhh]”hþ)”}”(hŒMemTotal”h]”hŒMemTotal”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KGhjtubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjqubj)”}”(hhh]”hþ)”}”(hŒ 3091900 kB”h]”hŒ 3091900 kB”…””}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KGhj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjqubj)”}”(hhh]”hþ)”}”(hŒ 3091900 kB”h]”hŒ 3091900 kB”…””}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KGhj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjqubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjnubj)”}”(hhh]”(j)”}”(hhh]”hþ)”}”(hŒMemFree”h]”hŒMemFree”…””}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KHhjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj¿ubj)”}”(hhh]”hþ)”}”(hŒ42113 kB”h]”hŒ42113 kB”…””}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KHhjÙubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj¿ubj)”}”(hhh]”hþ)”}”(hŒ 1513236 kB”h]”hŒ 1513236 kB”…””}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KHhjðubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj¿ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjnubeh}”(h]”h ]”h"]”h$]”h&]”uh1jlhjìubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1jêhjçubah}”(h]”h ]”h"]”h$]”h&]”uh1jåhjáubah}”(h]”h ]”h"]”h$]”h&]”uh1jßh³hÇh´KDhhÊh²hubhþ)”}”(hŒýThis allows for coarse memory management for the tasks you assign to particular cpusets. Since cpusets can form a hierarchy, you can create some pretty interesting combinations of use-cases for various classes of tasks for your memory management needs.”h]”hŒýThis allows for coarse memory management for the tasks you assign to particular cpusets. Since cpusets can form a hierarchy, you can create some pretty interesting combinations of use-cases for various classes of tasks for your memory management needs.”…””}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KKhhÊh²hubeh}”(h]”Œfake-numa-for-cpusets”ah ]”h"]”Œfake numa for cpusets”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”jŒfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j^Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”j9j6sŒ nametypes”}”j9‰sh}”j6hÊsŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.