From bug-octave-request at bevo dot che dot wisc dot edu Mon Mar 29 11:46:32 1999 Subject: Slower on linux than HP - why ? From: Paul COURBIS To: bug-octave at bevo dot che dot wisc dot edu Date: Mon, 29 Mar 1999 19:46:23 +0200 Hi, We have a NFS server with files mounted on both HP Workstations and Linux boxes. HP are C200 s700, PCs are Pentium II 333 Mhz. Machines are connected together by a switched ethernet (10Mb switched), SNMP manageable. When running C programs, PCs with Linux are clearly faster than HPs (2 to 10 times). BUT when running octave, the linux boxes are incredibly slower than HPs ! My Network Analysing tools showed me that there's a incredible network load on the Linux box (up to 70% of 10Gb bandwidth)... [note: tool is scotty] It seems to be NFS traffic. I did an 'strace' on the octave on the linux box and so that there are many "open/close" on directories : open("../../..", O_RDONLY) = 4 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 fstat(4, {st_mode=0, st_size=0, ...}) = 0 lseek(4, 0, SEEK_CUR) = 0 getdents(4, /* 8 entries */, 3933) = 144 lstat("../../../cybersix", {st_mode=0, st_size=0, ...}) = 0 lstat("../../../gaston", {st_mode=0, st_size=0, ...}) = 0 lstat("../../../spip", {st_mode=0, st_size=0, ...}) = 0 close(4) = 0 lstat("../../../..", {st_mode=0, st_size=0, ...}) = 0 open("../../../..", O_RDONLY) = 4 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 fstat(4, {st_mode=0, st_size=0, ...}) = 0 lseek(4, 0, SEEK_CUR) = 0 etc... Looks like octave was looking at .., then all in .., then ../.., then ../../* and so on... Strange isn't it ? As it seems clear that NFS traffic decrease Octave's performances on Linux boxes, the question is : - Are HPs better beacuse NFS is better on HPs ? - or is it a bug in a function used by octave that appears only on Linux ? In case 1), trying to decrease the network load (ie: files accesses) by using caching techniques or precompilation would certainly increase Octave performance on all platforms. In case 2, tracking the bug would make linux even better ;-) [I'm not an octave guru, just a sysadmin for octave users, who do not really know where to begin looking for the solution] Any help would be apreciated. Best regards Paul -- -=-=-=-=-=- Paul COURBIS -=- Responsable Systemes Informatiques -=-=-=-=-=- -=-=-=- Centre de Recherche Motorola -=- Paul dot COURBIS at crm dot mot dot com -=-=-=- -=- Voice: +33 (0)1 69.35.25.37 Fax: +33 (0)1 69.35.25.01 -=- Opinions hereabove are my own and not those of my organization