Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
For the last couple of days I have been struggling to identity the reason for a drop in performance when I've tried to upgrade from 32bit 5.8.9 to 64bit 5.24.0 on Windows. The drop in performance is around the 30% mark, but in some tests it is as high as 80%. This is measured using our own performance test suite. I suspect I am missing something simple, so any suggestions would be helpful...
The application in question is a mix of perl/xs/c on windows, but the backend can and does run on Linux (with the same test and performance suite). The rational of going to 64bits is that users are running out of memory when running large jobs. The jobs can take time - hours in some cases, so any drop in performance is a major issue. The application passes it's comprehensive test suite on all versions of perl that I have tested it with. The compile flags are the same (-O2) in all cases. Versions of GCC are, however, different. Testing 64 bit v 32 bit build with the same version of perl/gcc always has the 64bit version being faster. An overview:
I was unable to build a 32bit version of perl in my Linux environment, I am currently trying to get a version 64bit version of Activestate 5.24 to work. Perl -V for 32bit Activestate 5.8.9 and 64bit strawberry is below.
Thoughts? Have I missed something simple?
Set up gcc environment - gcc.exe (TDM-1 mingw32) 4.4.1 Summary of my perl5 (revision 5 version 8 subversion 9) configuration: Platform: osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=define use5005threads=undef useithreads=define usemulti +plicity=de fine useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='C:/MinGW32/bin/gcc.exe', ccflags ='-DNDEBUG -DWIN32 -D_CONSOLE + -DNO_STRI CT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST +_IN_INC -D PERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_R +EADFIX -DH ASATTRIBUTE -fno-strict-aliasing -mms-bitfields', optimize='-O2', cppflags='-DWIN32' ccversion='', gccversion='gcc.exe (TDM-1 mingw32) 4.4.1', gccosand +vers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64 +', lseeksi ze=8 alignbytes=8, prototype=define Linker and Libraries: ld='C:\MinGW32\bin\g++.exe', ldflags ='-L"C:\Perl\lib\CORE"' libpth=\lib libs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 +-lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion +-lodbc32 - lodbccp32 -lmsvcrt perllibs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvap +i32 -lshel l32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lvers +ion -lodbc 32 -lodbccp32 -lmsvcrt libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl58.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -L"C:\Perl\lib\CORE"' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_IMPLIC +IT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_FAST_STD +IO USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 827 [291969] f7bbab select() generates 'Invalid parameter' messages on Wind +ows Vista. 36f064 do/require don't treat '.♀oo' or '..♀oo' as + absolute paths on Win dows 287a96 Fix -p function and Fcntl::S_IFIFO constant under Micro +soft VC co mpiler Iin_load_module moved for compatibility with build 806 Less verbose ExtUtils::Install and Pod::Find Rearrange @INC so that 'site' is searched before 'perl' Partly reverted #dafda6 to preserve binary compatibility 5e162c Problem killing a pseudo-forked child on Win32 3e5d88 ANSIfy the PATH environment variable on Windows c71e9b,29e136 win32_async_check() can loop indefinitely aeecf6 Fix alarm() for Windows 2003 Built under MSWin32 Compiled at Jan 26 2010 21:15:51 @INC: C:/Perl/site/lib C:/Perl/lib Platform: osname=MSWin32, osvers=6.3, archname=MSWin32-x64-multi-thread uname='Win32 strawberry-perl 5.24.0.1 #1 Tue May 10 21:30:49 2016 +x64' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL +_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv + -fno-strict-aliasing -mms-bitfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.9.2', gccosandvers='' intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678 +, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6, longdblkind=3 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='lo +ng long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~ +1\c\lib"' libpth=C:\STRAWB~1\c\lib C:\STRAWB~1\c\x86_64-w64-mingw32\lib C:\S +TRAWB~1\c\lib\gcc\x86_64-w64-mingw32\4.9.2 libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_3 +2 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl524.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"C:\STRAWB~1\perl\lib\CORE" +-L"C:\STRAWB~1\c\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT +_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at May 10 2016 21:42:01 @INC: C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib
|
|---|