Getting O to run as fast as an Octane on a cheap Linux PC
Many reports have described O as running "fast" or "nice and smooth" on linux, but, until recently, I had not seen the O version for Linux be anything but pathetic when compared side-by-side to our Octane.
But, that's all over now. It took me a week or so to figure it out, but I have tried to lay everything out here:
Hardware:
Software:
Procedure:
jamesh@linux% su - Password: [root@linux /root]# uname -a Linux linux.berkeley.edu 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown [root@linux /root]# mkdir /tmp/nVidia [root@linux nVidia]# cd /tmp/nVidia [root@linux nVidia]# wget 'http://www.nvidia.com/Pages.nsf/Lookup/linux_02/$file/NVIDIA_kernel-0.9-769.src.rpm' [root@linux nVidia]# wget 'http://www.nvidia.com/Pages.nsf/Lookup/linux_01/$file/NVIDIA_GLX-0.9-769.i386.rpm' [root@linux nVidia]# ls -lrt total 1464 -rw-r--r-- 1 jamesh gopher 36016 Apr 28 10:02 README.html -rw-r--r-- 1 jamesh gopher 416534 May 4 08:17 NVIDIA_kernel-0.9-769.src.rpm -rw-r--r-- 1 jamesh gopher 1033035 May 7 18:50 NVIDIA_GLX-0.9-769.i386.rpm [root@linux nVidia]# rpm --rebuild NVIDIA_kernel-0.9-769.src.rpm Installing NVIDIA_kernel-0.9-769.src.rpm Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.85707 + umask 022 + cd /usr/src/redhat/BUILD + cd /usr/src/redhat/BUILD + rm -rf NVIDIA_kernel-0.9-769 + /bin/gzip -dc /usr/src/redhat/SOURCES/NVIDIA_kernel-0.9-769.tar.gz + tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd NVIDIA_kernel-0.9-769 ++ /usr/bin/id -u + '[' 0 = 0 ']' + /bin/chown -Rhf root . ++ /usr/bin/id -u + '[' 0 = 0 ']' + /bin/chgrp -Rhf root . + /bin/chmod -Rf a+rX,g-w,o-w . + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.85707 + umask 022 + cd /usr/src/redhat/BUILD + cd NVIDIA_kernel-0.9-769 + make NVdriver cc -c -Wall -Wunknown-pragmas -Wno-multichar -O -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DUNIX -DLINUX -DNV4_HW -DNTRM -DRM20 -D_X86_=1 -Di386=1 -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=769 -I. -I/lib/modules/2.4.2-2smp/build/include nv.c cc -c -Wall -Wunknown-pragmas -Wno-multichar -O -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DUNIX -DLINUX -DNV4_HW -DNTRM -DRM20 -D_X86_=1 -Di386=1 -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=769 -I. -I/lib/modules/2.4.2-2smp/build/include os-interface.c cc -c -Wall -Wunknown-pragmas -Wno-multichar -O -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DUNIX -DLINUX -DNV4_HW -DNTRM -DRM20 -D_X86_=1 -Di386=1 -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=769 -I. -I/lib/modules/2.4.2-2smp/build/include os-registry.c ld -r -o Module-linux nv.o os-interface.o os-registry.o ld -r -o NVdriver Module-linux Module-nvkernel size NVdriver text data bss dec hex filename 465637 28160 19524 513321 7d529 NVdriver + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.30436 + umask 022 + cd /usr/src/redhat/BUILD + cd NVIDIA_kernel-0.9-769 + '[' -z '' ']' ++ uname -r + export TARGET_KERNEL=2.4.2-2smp + TARGET_KERNEL=2.4.2-2smp + '[' -n /var/tmp/NVIDIA_kernel-0.9 -a /var/tmp/NVIDIA_kernel-0.9 '!=' / ']' + rm -rf /var/tmp/NVIDIA_kernel-0.9 + '[' -d /var/tmp/NVIDIA_kernel-0.9/lib/modules/2.4.2-2smp/kernel/ ']' + INSTALLPATH=/var/tmp/NVIDIA_kernel-0.9/lib/modules/2.4.2-2smp/video + mkdir -p /var/tmp/NVIDIA_kernel-0.9/lib/modules/2.4.2-2smp/video + install -m 0444 NVdriver /var/tmp/NVIDIA_kernel-0.9/lib/modules/2.4.2-2smp/video + unset RPM_BUILD_ROOT + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip + /usr/lib/rpm/brp-strip-comment-note Processing files: NVIDIA_kernel-0.9-769 Finding Provides: (using /usr/lib/rpm/find-provides)... Finding Requires: (using /usr/lib/rpm/find-requires)... PreReq: /bin/sh /bin/sh rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(interp): /bin/sh /bin/sh Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(post): /bin/sh Requires(preun): /bin/sh Requires: kernel >= 2.2.0 Wrote: /usr/src/redhat/RPMS/i386/NVIDIA_kernel-0.9-769.i386.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.16152 + umask 022 + cd /usr/src/redhat/BUILD + cd NVIDIA_kernel-0.9-769 + '[' -n /var/tmp/NVIDIA_kernel-0.9 -a /var/tmp/NVIDIA_kernel-0.9 '!=' / ']' + rm -rf /var/tmp/NVIDIA_kernel-0.9 + exit 0 Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.16152 + umask 022 + cd /usr/src/redhat/BUILD + rm -rf NVIDIA_kernel-0.9-769 + exit 0 [root@linux nVidia]# rpm -ivh /usr/src/redhat/RPMS/i386/NVIDIA_kernel-0.9-769.i386.rpm Preparing... ########################################### [100%] 1:NVIDIA_kernel ########################################### [100%] NVdriver installed successfully [root@linux nVidia]# rpm -ivh NVIDIA_GLX-0.9-769.i386.rpm Preparing... ########################################### [100%] --- WARNING!! libglx.a libGLcore.a libGL.a libGL.so.1.2.030401 --- Above file(s) possibly belong to a conflicting MESA rpm. --- They have been renamed to xxx.<originalFile>.RPMSAVE to --- avoid conflicting with the files contained within this --- package. --- Please check http://www.nvidia.com/drivers/xfree86_40.html --- for details, under section 5.2 1:NVIDIA_GLX ########################################### [100%]
[root@linux nVidia]# cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.original [root@linux nVidia]# cat /etc/X11/XF86Config-4.original |\ awk '$1=="Driver" && $2 == "\"nv\"" {print " Driver \"nvidia\"";next} \ $1=="Load" && $2 == "\"GLcore\"" {$0= "#" $0}\ $1=="Load" && $2 == "\"dri\"" {$0= "#" $0}\ {print}' |\ cat > /etc/X11/XF86Config-4 [root@linux nVidia]# diff /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.original 28c28 < # Load "GLcore" --- > Load "GLcore" 33c33 < # Load "dri" --- > Load "dri" 118c118 < Driver "nvidia" --- > Driver "nv" [root@linux nVidia]# cd /usr/lib [root@linux lib]# ln -sf libGLU.so libMesaGLU.so.3 [root@linux lib]# ln -sf libGL.so libMesaGL.so.3
[root@linux lib]# cd ~/rpms [root@linux rpms]# rpm -i o-data-6_4-1_noarch.rpm [root@linux rpms]# rpm -i o-util-6_4-1_i386.rpm [root@linux rpms]# rpm -i --nodeps o-6_4-1_i386.rpm
[root@linux rpms]# reboot
[root@linux /root]# mkdir /tmp/otest [root@linux /root]# cd /tmp/otest [root@linux otest]# wget http://bl831.als.lbl.gov/~jamesh/benchmarks/omark.tar [root@linux otest]# tar xvf omark.tar helix.omap helix.pdb test.omac binary.o [root@linux otest]# ono O> @test.omac
This macro loads up a calculated map of an alpha helix, and gives it a "spin" in o. O has a special "spin" command which is meant for benchmarking graphics hardware. Several "spin" times with this very map are available here. If your computer takes longer than 10 seconds to "spin" this map, then there is probably something wrong with your setup. Have a look at nVidia's FAQ to find out more.
Anyway, this is how I saved my lab $30,000 bucks on new SGIs that we no longer need.
Back to the Elves Homepage.