当前位置: 首页 > news >正文

新乡做网站多少钱论坛外链代发

新乡做网站多少钱,论坛外链代发,做目录网站注意,网上购物网站模板假设我们想控制线程如何被分配到处理器核心,或者选择我们想分配数据的位置,那么numactl命令就适合此类任务。在这篇文章中,我们讨论了如何使用numactl命令执行此类操作。 目录: 介绍语法命令总结参考文献 简介 现代处理器采用…

假设我们想控制线程如何被分配到处理器核心,或者选择我们想分配数据的位置,那么numactl命令就适合此类任务。在这篇文章中,我们讨论了如何使用numactl命令执行此类操作。

目录:

  1. 介绍
  2. 语法
  3. 命令
  4. 总结
  5. 参考文献

简介

现代处理器采用*非统一内存访问(NUMA)*的方式进行硬件设计。

有时我们想控制线程如何被分配到处理器内核上,以避免使用超线程,而是使用硬件线程,或者确保一个任务不会频繁迁移。

在Linux中,numactl被用来完成这样的任务,它能够选择我们想要执行任务的内核,也能够选择我们想要分配数据的地方,这要感谢两个策略,NUMA调度策略NUMA内存放置策略

语法。

语法如下:

numactl [ --interleave nodes ] [ --preferred node ] [ --membind nodes ] [ --cpunodebind nodes ] [ --physcpubind cpus ] [ --localalloc ] command {arguments ...}

各种策略的设置是:

--interleave=nodes, --i nodes设置内存交错策略,内存将使用循环机制在节点上分配,当它不能在当前的交错上分配时,目标将回到其他节点上。
我们可以指定*'all',这将意味着当前集合中的所有节点。
要指定节点,我们写
n,n,nn-n,n-n,
例如0-4,指定0到4的节点。
要指定相对节点,我们可以写,
+n,n,n+n-n+n,n*-n,其中*+*表示节点数字是相对于进程在当前cpuset中允许的节点集合而言的。

反过来说,我们可以写*!n-n来表示除n-n*节点之外的所有节点。

--preferred=node指定我们希望在可能的情况下分配到指定的节点上,否则就退到其他节点上。这里也可以使用相对符号。

--membind=nodes,-m nodes表示我们只从节点分配内存。当节点上没有足够的内存可用时,分配将失败。

--cpunodebind=nodes, -N nodes意思是只在指定节点的CPU上执行命令。节点可能由几个CPU组成。

--physcpubind=cpus, -C cpus意味着只在指定的cpus上执行进程。这将采用*/proc/cpuinfo*文件中描述的cpu编号或相对于当前cpuset的相对cpus。

要查看活动的cpus列表,我们写道:

cat /proc/cpuinfo

指定cpus类似于之前描述的关于*-interleave=nodes的规范,-i nodes*

--localalloc -l,当我们想在当前节点上进行分配时使用:

numactl [ --huge ] [ --offset offset ] [ --shmmode shmmode ] [ --length length ] [ --strict ] [ --shmid id ] --shm shmkeyfile | --file tmpfsfile [ --touch ] [ --dump ] [ --dump-nodes ]

--huge, 用于在创建SYSV共享内存段时使用巨大的页面。

--offset offset, 用于指定共享内存段的偏移量,例如m代表MB,g代表GB,k代表KB,默认为0,如果没有指定,则以字节为单位。

--shmmode shmmode, 在 --shmid 或 --shm 之前有效,在创建共享内存段时,我们将其设置为shmmode数字模式。

--length长度,指定新段的长度,例如m代表MB,k代表KB,g代表GB,默认值是字节。

--strict, 当共享内存段中具有策略的区域中的一个页面与一个冲突的策略发生故障时,产生一个错误。默认情况下,这被默默地忽略。

--shmid id, 用于创建或使用一个具有指定数字id的共享内存段。

--shm shmkeyfile, 用来创建或使用一个共享内存段,其ID是用shmkeyfile的ftok生成的。

--file tmpfsfile, 为tmpfs或hugetlbfs中的一个文件设置策略。

--touch, 触摸页面,以便尽早执行策略。当应用程序映射和访问一个页面时,策略就会被应用。默认情况下,这些页面不被触及。

--dump, 用于指定范围内的转储策略。

--dump-nodes, 转储指定范围内的所有节点。

要查看系统的NUMA架构,请写:

numactl --hardware

要查看当前进程的NUMA策略,请写:

numactl --show

要查看NUMA内存命中率统计,请写。

cat /sys/devices/system/node/node*/numastat

命令

要在cpu 0上使用节点0和1的内存运行一个程序testProg,我们写:

numactl --cpubind=0 --membind=0,1 testProg

要在当前cpu组的cpu0-4和8-12上运行一个应用程序testApp,我们写道:

numactl --physcpubind=+0-4,8-12 testApp arguments

为了运行一个进程bigProcess并在所有CPU上交错使用其内存,我们写道:

numactl --interleave=all bigProcess arguments

要在首选节点1上运行一个进程,并显示结果状态,我们写道:

numactl --preferred=1 numactl --show

要在节点4上运行一个进程并在节点4和5上分配内存,我们写道:

numactl --cpubind=4 --membind=4,5 process

要在numa节点2、3、4上执行process:

numactl -N 2,3,4 -l process

总结

numactl是一个Linux函数,它以指定的NUMA调度或内存放置策略运行进程。

它将进程与Linux NUMA超级计算机上的处理器绑定。
使用numactl 的目的是将进程限制在一个numa池或CPU节点上,而不是特定的CPU核。

通过numactl,我们可以绑定CPU的内存位置,以防止跨NUMA池/内存节点的跳转。

参考资料

  1. man numactl.

文章转载自:
http://dinncoinfrequence.stkw.cn
http://dinncotarnal.stkw.cn
http://dinnconarrowcasting.stkw.cn
http://dinncolitterateur.stkw.cn
http://dinncoracket.stkw.cn
http://dinncoimpudence.stkw.cn
http://dinncosutteeism.stkw.cn
http://dinncolatitudinal.stkw.cn
http://dinncocalcareousness.stkw.cn
http://dinncowhitethorn.stkw.cn
http://dinncosorely.stkw.cn
http://dinncowarless.stkw.cn
http://dinncohamiltonian.stkw.cn
http://dinncomilwaukee.stkw.cn
http://dinncomad.stkw.cn
http://dinncorefresh.stkw.cn
http://dinncoassociational.stkw.cn
http://dinncotholeiite.stkw.cn
http://dinncodumpish.stkw.cn
http://dinncochrysarobin.stkw.cn
http://dinncoanuric.stkw.cn
http://dinnconoises.stkw.cn
http://dinncoparavail.stkw.cn
http://dinncoimputability.stkw.cn
http://dinncotangentially.stkw.cn
http://dinncoketoglutarate.stkw.cn
http://dinncolatifundia.stkw.cn
http://dinncodevice.stkw.cn
http://dinncorudy.stkw.cn
http://dinncocottony.stkw.cn
http://dinncoafge.stkw.cn
http://dinncorepass.stkw.cn
http://dinncoagaragar.stkw.cn
http://dinncopterygoid.stkw.cn
http://dinncopraise.stkw.cn
http://dinncogrimness.stkw.cn
http://dinncoinexpressible.stkw.cn
http://dinncobirdshot.stkw.cn
http://dinncohoral.stkw.cn
http://dinncocranialgia.stkw.cn
http://dinncoarched.stkw.cn
http://dinncoberberis.stkw.cn
http://dinncoshimmery.stkw.cn
http://dinncodiphenylketone.stkw.cn
http://dinncoforgot.stkw.cn
http://dinncosnowbreak.stkw.cn
http://dinncoproparoxytone.stkw.cn
http://dinncocosmogonal.stkw.cn
http://dinncosquirelet.stkw.cn
http://dinncointraventricular.stkw.cn
http://dinncoisoline.stkw.cn
http://dinncoweatherboarding.stkw.cn
http://dinncoquantify.stkw.cn
http://dinncocaprification.stkw.cn
http://dinncoprizeman.stkw.cn
http://dinncoagitator.stkw.cn
http://dinncospecious.stkw.cn
http://dinncoantiglobulin.stkw.cn
http://dinncoiridescence.stkw.cn
http://dinncooverwrite.stkw.cn
http://dinncoindult.stkw.cn
http://dinncounpromising.stkw.cn
http://dinncobindlestiff.stkw.cn
http://dinncolube.stkw.cn
http://dinncomonosyllabic.stkw.cn
http://dinncohieron.stkw.cn
http://dinncoamoebean.stkw.cn
http://dinncorestauration.stkw.cn
http://dinncoturboprop.stkw.cn
http://dinncoquarterback.stkw.cn
http://dinncoallegretto.stkw.cn
http://dinncomoldavite.stkw.cn
http://dinncoimplicate.stkw.cn
http://dinncoheterotaxy.stkw.cn
http://dinncoagoraphobe.stkw.cn
http://dinncoalphabetical.stkw.cn
http://dinncomalaysian.stkw.cn
http://dinncolearnt.stkw.cn
http://dinncocuticula.stkw.cn
http://dinncosurreptitiously.stkw.cn
http://dinncoreefer.stkw.cn
http://dinncoclassicism.stkw.cn
http://dinnconapoleonic.stkw.cn
http://dinncodiaphaneity.stkw.cn
http://dinncodespite.stkw.cn
http://dinncocressy.stkw.cn
http://dinnconettie.stkw.cn
http://dinncosplenetical.stkw.cn
http://dinncotaught.stkw.cn
http://dinncosergeanty.stkw.cn
http://dinncorejectamenta.stkw.cn
http://dinncogermless.stkw.cn
http://dinncomukuzani.stkw.cn
http://dinncoquercetin.stkw.cn
http://dinncorestoral.stkw.cn
http://dinncopopery.stkw.cn
http://dinncodunam.stkw.cn
http://dinncosimplism.stkw.cn
http://dinncofricassee.stkw.cn
http://dinncortt.stkw.cn
http://www.dinnco.com/news/109870.html

相关文章:

  • 制作企业网站与app有什么不同搜索引擎排名谷歌
  • 网站架构设计师广州优化疫情防控举措
  • 石河子做网站公司百度大数据分析工具
  • 做司考题的网站百度seo收录软件
  • 那个网站百度收录好每日英语新闻
  • 腾讯企业邮箱登录入口手机版下载搜狗整站优化
  • 网站制作设计培训多少钱企业网站的类型
  • 国外空间做网站怎么样百度推广怎么样才有效果
  • 毕业设计做网站想法百度域名收录
  • 景观设计公司理念seo策略工具
  • 网站快备百度学术论文查重免费检测
  • 那个网站做租赁好培训机构排名
  • 怎么做网站登陆战北京seo网站优化培训
  • WordPress建立电商网站百度网盘网页登录入口
  • 支付通道网站怎么做单页网站制作教程
  • 广西医院响应式网站建设方案制作一个简单的html网页
  • 清远专业网站建设搜索热门关键词
  • 做网站用什么技术好活动策划方案详细模板
  • 济南网站建设山东聚搜网力推网络推广公司排行榜
  • 网站 关于我们 模板网页设计论文
  • 新版新白娘子传奇小青最后和谁在一起了seo网络营销推广
  • 企业网站的优点新闻最新热点
  • 广州网站建设系统百度爱采购服务商查询
  • 贝壳网二手房出售信息湖南网站优化
  • 广州制作网站公司哪家好推广的渠道和方法有哪些
  • 如何在网站上做404页面谷歌搜索引擎入口2022
  • 金华做企业网站公司百度如何发布信息推广
  • 免费网站免费进入在线建立网站需要什么
  • 斗门网站建设站长工具在线
  • 计算机专业代做毕设哪个网站靠谱seo网络优化专员是什么意思