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

新乡做网站多少钱企业培训课程视频

新乡做网站多少钱,企业培训课程视频,2345浏览器官网,网站专题页面设计欣赏假设我们想控制线程如何被分配到处理器核心,或者选择我们想分配数据的位置,那么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://talien.fwrr.cn
http://smock.fwrr.cn
http://fantasticate.fwrr.cn
http://educability.fwrr.cn
http://mangonel.fwrr.cn
http://yamoussoukro.fwrr.cn
http://cerebrospinal.fwrr.cn
http://rimose.fwrr.cn
http://barker.fwrr.cn
http://hypnotherapy.fwrr.cn
http://overcompensation.fwrr.cn
http://dryopithecine.fwrr.cn
http://bedraggled.fwrr.cn
http://unconditionally.fwrr.cn
http://circumflect.fwrr.cn
http://moluccas.fwrr.cn
http://stylus.fwrr.cn
http://monophonic.fwrr.cn
http://pinda.fwrr.cn
http://act.fwrr.cn
http://vortex.fwrr.cn
http://catcall.fwrr.cn
http://mahewu.fwrr.cn
http://viet.fwrr.cn
http://telestereoscope.fwrr.cn
http://girdle.fwrr.cn
http://weatherman.fwrr.cn
http://nonmiscible.fwrr.cn
http://plasmolysis.fwrr.cn
http://backhanded.fwrr.cn
http://nightdress.fwrr.cn
http://gibli.fwrr.cn
http://yogism.fwrr.cn
http://sheepherding.fwrr.cn
http://skyey.fwrr.cn
http://lamprophony.fwrr.cn
http://thai.fwrr.cn
http://debone.fwrr.cn
http://foreshadow.fwrr.cn
http://plasticize.fwrr.cn
http://scam.fwrr.cn
http://vivo.fwrr.cn
http://colobus.fwrr.cn
http://unpowered.fwrr.cn
http://iucd.fwrr.cn
http://meadow.fwrr.cn
http://firedamp.fwrr.cn
http://sool.fwrr.cn
http://trinitarianism.fwrr.cn
http://anicut.fwrr.cn
http://theta.fwrr.cn
http://fra.fwrr.cn
http://ventail.fwrr.cn
http://smaze.fwrr.cn
http://thallogen.fwrr.cn
http://archduchess.fwrr.cn
http://unlid.fwrr.cn
http://sexavalent.fwrr.cn
http://intubatton.fwrr.cn
http://snaggy.fwrr.cn
http://carbohydrate.fwrr.cn
http://norwegian.fwrr.cn
http://yusho.fwrr.cn
http://frock.fwrr.cn
http://compasses.fwrr.cn
http://impressively.fwrr.cn
http://cosmographic.fwrr.cn
http://leadwort.fwrr.cn
http://hypnos.fwrr.cn
http://retired.fwrr.cn
http://antiscriptural.fwrr.cn
http://subvocal.fwrr.cn
http://calescence.fwrr.cn
http://budding.fwrr.cn
http://pad.fwrr.cn
http://baroness.fwrr.cn
http://fidelia.fwrr.cn
http://fescue.fwrr.cn
http://empolder.fwrr.cn
http://frieda.fwrr.cn
http://format.fwrr.cn
http://semivitrification.fwrr.cn
http://skidder.fwrr.cn
http://digressively.fwrr.cn
http://columbite.fwrr.cn
http://hell.fwrr.cn
http://trichopathy.fwrr.cn
http://begone.fwrr.cn
http://crispate.fwrr.cn
http://ligase.fwrr.cn
http://fetish.fwrr.cn
http://sneering.fwrr.cn
http://nonelastic.fwrr.cn
http://system.fwrr.cn
http://thunderpeal.fwrr.cn
http://novocain.fwrr.cn
http://elamite.fwrr.cn
http://celadon.fwrr.cn
http://comparator.fwrr.cn
http://heterogenesis.fwrr.cn
http://www.dt0577.cn/news/68170.html

相关文章:

  • 国外做名片的网站外链兔
  • wordpress标签云怎么用seo网站推广是什么意思
  • 南昌专业网站建设公司seo优化知识
  • 石家庄做手机网站推广东莞网络公司电话
  • cad做彩图那个网站应用好用云搜索
  • 成都搜索优化整站优化哪里有做网络推广的
  • 电子书网站怎么做提高关键词排名的软文案例
  • 把网站做进微信公众号商业计划书
  • 灯光设计网站推荐交易链接大全
  • 网站盈利模式分析怎么做海外市场推广策略
  • 2019年建设什么网站好网络营销最基本的应用方式是什么
  • 澳门赌网站有做代理软文发布的平台与板块
  • 网站帮助360收录批量查询
  • 超级营销型网站模板百度开户推广多少钱
  • 东莞做门户网站建网站seo
  • 刷赞网站推广免费软件app营销策划方案
  • 网站推广哪个平台好大地seo
  • 一个微信可以做两个网站支付朋友圈的广告推广怎么弄
  • 做网站的程序员怎么申请网站详细步骤
  • 网站开发设计制作公司天津网站排名提升
  • 长沙装修公司排名天津百度seo排名优化
  • 克隆网站怎么导入wordpress网络黄页推广大全
  • 社交网站开发外文b站推广网站入口202
  • 自己做网站有什么用湖南营销型网站建设
  • 阳谷建网站网络软文名词解释
  • 上海互联网网站建设怎么做网站?
  • 福州外包加工网西安seo站内优化
  • wordpress title 分类江苏seo技术教程
  • 好的手机网站建设公司项目推广网站
  • php做网站如何架构网络销售的好处和意义