Let me preface this by stating I am a junior systems admin who knows very little about Perl and tuning servers for specific applications, especially Perl apps.
We have a Netfinity 7000 M10 with the following specs:
4 Pentium II (Deschutes) 400 MHz processors each w/1024KB's of cache
2 Gigs of RAM
3 10K RPM SCSI HDD's
1 15k RPM SCSI HDD's
RedHat 9.0 kernel version 2.4.20-19.9smp
We are trying to utilize a certain PERL program that is acting as a portal (sort of) for our companies day-to-day computing needs. That is all this box is being used for. User's SSH to this box and invoke an instance of said program.
The problem is this...
This program runs a little slow... When an exact copy of this program is thrown on a plain old workstation (a box with a 450MHz cpu and maybe 128 MB's of RAM), it runs much faster than on the Netfinity. Now aside from turning off all unwanted daemons and processes, I haven't done much in the way of tuning this box.
The perl code in question lives on the 15K RPM SCSI HDD by the way...
In an attempt at defining what I mean by slow, I should state that the program consists of a a good number of PERL scripts that get exec'd as needed. The program starts when the user ssh's to said server, starts up an Xterm on their local display and then exec's an initial wrapper script. This initial script contains a menu whose options correspond to PERL scripts that when exec'd, end up replacing the initial parent script. And as expected, there are submenus of options that exhibit the same behavior.
The "slowness" in question here is when the user switches between menus. I am assumming their is some sort of IO bottleneck upon the reading/compilation of each script.
I do not believe that the network is an issue here... When I performed the intial test with my workstation versus the server, the same network was used and dramatic results were observed. I even ran the code locally on the server in question and experienced the same "slowness".
The perl install has evidently compiled with threading enabled.
# perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuratio +n: Platform: osname=linux, osvers=2.4.20-2.48smp, archname=i386-linux-thread-mu +lti uname='linux stripples.devel.redhat.com 2.4.20-2.48smp #1 smp thu +feb 13 11:44:55 est 2003 i686 i686 i386 gnulinux ' config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -g -Dmyhos +tname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, +Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendo +rprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0 -D +useshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_ +semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext +=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -D +pager=/usr/bin/less -isr' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemulti +plicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS + -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_S +OURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -march=i386 -mcpu=i686 -g', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGI +NG -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.2.2 20030213 (Red Hat Linux 8.0 3.2.2- +1)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil libc=/lib/libc-2.3.1.so, so=so, useshrplib=true, libperl=libperl.s +o gnulibc_version='2.3.1' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynami +c -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_ +FILES PERL_IMPLICIT_CONTEXT Locally applied patches: MAINT18379 Built under linux Compiled at Feb 18 2003 22:19:53 @INC: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
After speaking with the developers, I have assessed that they are not making use of threads nor are they using any forks to spawn new processes. They are using "exec's" and "system calls" to accomplish the tasks at hand.
Any ideas of what the problem may be? I am being told that it is a systems/server issue. I have been seeking knowledge relating to any performance enhancements I can make to help this program operate but have come up with very little if anything at all.
Care to help?
Thanks in advance...
In reply to Possible Perl Issue, plz help... by WeNdeL
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |