Extra swapping when using gfortran 4.3-20061224 vs gfortran 4.2-20061211
Toon Moene
toon@moene.indiv.nluug.nl
Thu Feb 22 18:44:00 GMT 2007
I wrote, in December 2006:
> A run of HIRLAM for which the grid was carefully tuned (half a year ago)
> to the RAM size of my laptop suddenly started to swap two weeks ago when
> using gfortran 4.3 as the compiler.
>
> However, as the HIRLAM suite I'm testing with also constantly changes, I
> first suspected our own source code. Today I finished the back-to-back
> comparison of gfortran 4.3-20061224 vs. gfortran 4.2-20061211. Compiling
> all the source with the first (experimental) compiler makes HIRLAM swap
> during execution, whereas with the second (prerelease) compiler, it
> doesn't.
While I still believe this experiment was valid and produced the results
I describe here, I now have proof that this extra swapping is not caused
by the MEM-SSA changes.
At a request by Diego Novillo, I ran two versions of HIRLAM (7.0, which
dates from May last year and 7.1beta2, which dates from two weeks ago)
using both the Fortran/C compiler from trunk revision 119759 (just
before the MEM-SSA changes went in) and revision 119760 (with those
changes).
The result is: No swapping for the 7.0 version of HIRLAM *with both
compilers*:
119759's top log, about half way through the forecast:
30070 hirlam 25 0 449m 333m 2144 R 99.9 66.8 16:00.26 hlprog.x
30070 hirlam 25 0 448m 333m 2144 R 99.9 66.7 16:03.27 hlprog.x
30070 hirlam 25 0 486m 359m 2144 R 99.9 71.9 16:06.27 hlprog.x
30070 hirlam 25 0 448m 296m 2144 R 99.9 59.3 16:09.27 hlprog.x
30070 hirlam 25 0 441m 322m 2144 R 99.9 64.6 16:12.29 hlprog.x
30070 hirlam 25 0 448m 333m 2144 R 99.9 66.7 16:15.29 hlprog.x
30070 hirlam 25 0 449m 333m 2144 R 99.9 66.8 16:18.29 hlprog.x
30070 hirlam 25 0 448m 332m 2144 R 99.9 66.6 16:21.29 hlprog.x
30070 hirlam 25 0 486m 376m 2144 R 99.9 75.5 16:24.30 hlprog.x
119760's top log:
30347 hirlam 25 0 448m 329m 1844 R 99.9 66.0 16:01.05 hlprog.x
30347 hirlam 25 0 486m 381m 1844 R 99.9 76.3 16:04.05 hlprog.x
30347 hirlam 25 0 456m 304m 1844 R 99.9 61.0 16:07.06 hlprog.x
30347 hirlam 25 0 486m 344m 1844 R 99.9 69.0 16:10.06 hlprog.x
30347 hirlam 25 0 449m 330m 1844 R 99.9 66.1 16:13.06 hlprog.x
30347 hirlam 25 0 448m 329m 1844 R 99.9 66.0 16:16.07 hlprog.x
30347 hirlam 25 0 448m 330m 1844 R 99.9 66.1 16:19.07 hlprog.x
30347 hirlam 25 0 486m 374m 1844 R 99.9 74.9 16:22.07 hlprog.x
30347 hirlam 25 0 448m 302m 1844 R 99.9 60.6 16:25.07 hlprog.x
30347 hirlam 25 0 486m 348m 1844 R 99.9 69.7 16:28.08 hlprog.x
Note that for both compilers, the maximum Resident Size is ~ 375 Mbyte,
and both executables ran 99.9 % of CPU usage.
The picture is completely different for the HIRLAM version 7.1beta2:
119759's top log:
25770 hirlam 18 0 543m 424m 1800 D 19.6 85.0 16:00.28 hlprog.x
25770 hirlam 18 0 543m 424m 1800 D 48.3 85.0 16:01.73 hlprog.x
25770 hirlam 18 0 544m 425m 1800 R 65.2 85.2 16:03.69 hlprog.x
25770 hirlam 18 0 544m 426m 1800 R 71.2 85.3 16:05.83 hlprog.x
25770 hirlam 18 0 550m 447m 1820 D 72.6 89.7 16:08.01 hlprog.x
25770 hirlam 18 0 550m 454m 1824 D 6.7 91.0 16:08.21 hlprog.x
25770 hirlam 18 0 547m 448m 1824 D 13.6 89.9 16:08.62 hlprog.x
25770 hirlam 18 0 537m 444m 1824 D 10.0 89.0 16:08.92 hlprog.x
25770 hirlam 18 0 477m 386m 1824 D 6.7 77.4 16:09.12 hlprog.x
119760's top log:
23023 hirlam 18 0 550m 434m 1520 D 4.3 86.9 16:00.02 hlprog.x
23023 hirlam 18 0 546m 437m 1520 R 17.0 87.5 16:00.53 hlprog.x
23023 hirlam 18 0 537m 436m 1520 R 9.3 87.4 16:00.81 hlprog.x
23023 hirlam 18 0 477m 379m 1524 R 6.7 76.0 16:01.01 hlprog.x
23023 hirlam 18 0 477m 382m 1656 R 2.0 76.6 16:01.07 hlprog.x
23023 hirlam 18 0 537m 393m 1672 R 28.3 78.7 16:01.92 hlprog.x
23023 hirlam 19 0 543m 409m 1672 D 60.6 81.9 16:03.74 hlprog.x
23023 hirlam 19 0 584m 449m 1672 R 78.6 89.9 16:06.10 hlprog.x
23023 hirlam 18 0 584m 453m 1672 D 33.3 90.8 16:07.10 hlprog.x
Note that the Resident Size maxes out at slightly over 450 Mbyte, which
is consistent with a RAM size of 511 Mbyte - you simply can't get much
more for a single executable on this system with X and scores of daemons
running. The swapping is evident from the 'D' process state (waiting
for disk) and the less than 99.9 % CPU utilization.
So the conclusion is: MEM-SSA doesn't lead to memory bloat. The test
results from 26 December last year must point to *another* difference
between the tested compilers (gfortran 4.3-20061224 vs. gfortran
4.2-20061211).
Cheers,
--
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
A maintainer of GNU Fortran: http://gcc.gnu.org/fortran/
Who's working on GNU Fortran:
http://gcc.gnu.org/ml/gcc/2007-01/msg00059.html
More information about the Fortran
mailing list