| Subject: | Re: The progress of stencil- |
|---|---|
| Date: | Fri, 9 Jan 2015 14:17:00 -0600 |
| From: | woodslong <woodslong@gmail.com> |
| To: | Kazutomo Yoshii <kazutomo@mcs.anl.gov> |
| CC: | Pavan <balaji@anl.gov>, Junchao Zhang <junchao.zhang@gmail.com>, Shigang Li <shigangli.cs@gmail.com>, Yunquan Zhang <yunquan.cas@gmail.com> |
Hi, Kaz
The necessary operations to use huge page are shown below(most copy from your email):
$ sysctl vm.hugetlb_shm_group=X # X is the group id for sharing, be sure that my account is the this group
$ sysctl vm.nr_hugepages=Y
$ echo always > /sys/kernel/mm/transparent_hugepage/enabled (maybe not needed)
$ mkdir -p /mnt/hugetlbfs
$ mount -t hugetlbfs none /mnt/hugetlbfs -o mode=1770,gid=X
Hi, all
Just now, I discussed with Junchao.
We think Cache miss and page fault are the two factors. I will try to verify that.
The less floating computation for MPI3 is not accurate. Please just ignore it.
Thanks,
OK! Pavan
I suddenly remembered another issue which affects the performance, that is the cache miss rate.
As the MPI3 version removes the ghost area then changes the data structure of the matrix, as well as the data layout. According with the data access pattern of a grid update, this cause more cache miss if the matrix size happens to be power of 2. In the former profiling, I used 4096*4096 matrix, so the MPI3 version has more cache miss.
Just now, I did another profiling with matrix 5034*5034, and MPI3 shows a better performance (only between MPI1 without huge page and MPI3 without huge page, noncontig), as MPI3 version has less floating point computations and the cache miss should be nearly the same with this random matrix size.
I am sorry I forgot that. I will add more profiling which contains all the 6 versions. If all the mpi3 version showed a better performance, it will be good.
OK, Pavan
Then how do you think about the future work?
I think if the reason is shared memory mechanism itself, it will be difficult to fix. Do you have any suggestions on the future work?
Xiaomin Zhu
Original MessageSender: Pavan" <balaji@anl.gov>Recipient: Xiaomin Zhu<woodslong@gmail.com>Cc: Pavan" <balaji@anl.gov>; Kazutomo" <kazutomo@mcs.anl.gov>; Junchao Zhang<junchao.zhang@gmail.com>; Shigang Li<shigangli.cs@gmail.com>; Yunquan Zhang<yunquan.cas@gmail.com>Date: Friday, Jan 9, 2015 00:55Subject: Re: The progress of stencil
> On Jan 9, 2015, at 7:45 AM, woodslong <woodslong@gmail.com> wrote: > > (3-4) Our aim is to make the shared memory have the same performance with malloc, but it seems impossible as the related overhead is inevitable. I'm not sure how you came to this conclusion. So far, we identified two problems: (1) compiler aliasing, and (2) huge pages. You are saying that there is at least one more reason that's causing performance degradation that we haven't identified yet. But that doesn't mean it's *impossible* to fix. -- Pavan -- Pavan Balaji ✉️ http://www.mcs.anl.gov/~balaji