> 1)我使用计算应用WRF(天气研究和预测)
> 2)我使用双Xeon E5-2620 v3和128GB RAM(NUMA架构 – 可能与问题有关!)
> 3)我用mpirun -n 22 wrf.exe运行WRF(我有24个逻辑核心可用)
> 4)我使用Centos 7和3.10.0-514.26.2.el7.x86_64内核
> 5)在计算性能方面,Everthing工作正常,直到有一件事情发生:
> 5a)linux文件缓存获取一些数据,或
> 5b)我使用tmpfs并用一些数据填充它@H_403_8@
在5a或5b场景中,我的WRF突然开始减速,有时甚至比正常慢约5倍.@H_403_8@
> 6)RAM没有被交换,甚至没有接近发生,在最坏的情况下我有大约80%的RAM空闲!
> 7)/etc/sysctl.conf中的vm.zone_reclaim_mode = 1似乎有助于延迟5a场景中的问题
> 8)回声1> / proc / sys / vm / drop_caches在5a场景中彻底解决问题,将WRF性能恢复到最大速度,但只是暂时直到文件缓存再次获取数据,所以我在cron中使用这个命令(别担心,没关系,我仅将计算机用于WRF,并且不需要文件缓存才能以完全的性能工作)
> 9)但是,上面的命令在5b场景中仍然没有做任何事情(当我使用tmpfs作为临时文件时)
> 10)只有当我手动清空tmpfs时,才能在5b场景中恢复perfomanace
> 11)这不是WRF或mpi问题
> 12)这只发生在这一种计算机类型上,我管理了很多相同/类似的purporse(WRF).只有这一个有完整的NUMA架构,所以我怀疑它有它的东西
> 13)我也怀疑RHEL内核有这个但是不确定,没有尝试重新安装到不同的发行版中
> 14)numad和numactl选项调用像“numactl -l”这样的mpirun,没有任何区别@H_403_8@
如果您有任何想法试图避免这些减速,请告诉我.@H_403_8@
在关注这个问题的一些“相关”链接后,有一个想法来找我.透明巨大的页面可以成为这个问题的根源吗?一些文章强烈建议THP在NUMA系统上不能很好地发挥作用.@H_403_8@
- yum install numad
- systemctl enable numad
- systemctl start numad
numad应该能够自动处理记忆位置.像进程这样的情况在第一个NUMA节点的cpu上运行,但它的数据在第二个NUMA节点的本地RAM中,不应再发生(除非所需内存量大于单个NUMA节点本地RAM的容量).@H_403_8@
我还建议使用配置文件配置调优服务,这与您的使用方案最匹配.您必须测量差异并选择最佳(或者您可以创建一些自定义).@H_403_8@
也许我已经找到了节点上奇怪行为的原因.我搜索了mpirun并找到了手册页:@H_403_8@
https://www.open-mpi.org/doc/current/man1/mpirun.1.php@H_403_8@
写道:@H_403_8@
Quick Summary@H_403_8@
If you are simply looking for how to run an MPI application,you probably want to use a command line of the following form:
% mpirun [ -np X ] [ –hostfile ]
This will run X copies of in your current run-time environment (if running under a supported resource manager,Open MPI’s mpirun will usually automatically use the corresponding resource manager process starter,as opposed to,for example,rsh or ssh,which require the use of a hostfile,or will default to running all X copies on the localhost),scheduling (by default) in a round-robin fashion by cpu slot. See the rest of this page for more details.@H_403_8@Please note that mpirun automatically binds processes as of the start of the v1.8 series. Three binding patterns are used in the absence of any further directives:@H_403_8@
Bind to core:
when the number of processes is <= 2@H_403_8@Bind to socket:
when the number of processes is > 2@H_403_8@Bind to none:
when oversubscribed@H_403_8@If your application uses threads,then you probably want to ensure that you are either not bound at all (by specifying –bind-to none),or bound to multiple cores using an appropriate binding level or specific number of processing elements per application process.@H_403_8@
在n = 22的情况下,没有应用绑定,可以重新定位线程.您可以尝试外部cpu绑定(与任务集一样).你必须做实验.@H_403_8@