€•~9Œ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Œ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”…””}”(hhõhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œ!mailto:rientjes@cs.washington.edu”uh1hóhhë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”…””}”(hj!hž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.”…””}”(hj/hž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”…””}”(hj=hž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.”…””}”(hjKhž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:”…””}”(hjYhž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”…””}”hjisbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jghŸ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:”…””}”(hjwhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h K*hh¶hžhubjh)”}”(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²uh1jghŸ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žhubjh)”}”(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²uh1jghŸ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”…””}”(hj hž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”…””}”(hj!hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h KEhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hhh]”hê)”}”(hŒ Restricted”h]”hŒ Restricted”…””}”(hj8hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h KEhj5ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjýubah}”(h]”h ]”h"]”h$]”h&]”uh1jûhjØubhŒtbody”“”)”}”(hhh]”(j)”}”(hhh]”(j)”}”(hhh]”hê)”}”(hŒMemTotal”h]”hŒMemTotal”…””}”(hjchžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h KGhj`ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj]ubj)”}”(hhh]”hê)”}”(hŒ 3091900 kB”h]”hŒ 3091900 kB”…””}”(hjzhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h KGhjwubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj]ubj)”}”(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&]”uh1jhj]ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjZubj)”}”(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&]”uh1jhjZubeh}”(h]”h ]”h"]”h$]”h&]”uh1jXhjØ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.”…””}”(hjhž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”jJŒ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”}”j%j"sŒ nametypes”}”j%‰sh}”j"h¶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.