There are 5 steps to do basic research on cluster computing with kerrighed: system and applications installation, building, testing, profiling cluster, and comparing the results.
sudo
to the system for packages installation dan system modification
automake, libtool, pkg-config, lsb-release, libncurses5-dev1)
kernel-package if you want to package the kernel into debian package
cd /usr/src/
./configure --enable-tests
******************************************************************** Kerrighed tests configuration is now complete ******************************************************************** - apps : yes - proc : yes - ktp : yes - benchmark : yes ******************************************************************** Kerrighed configuration is now complete ******************************************************************** - Sources dir : /usr/src/krg-20090203 - Kernel source dir : /usr/src/krg-20090203/kernel - Kernel version : 2.6.20-krg (already patched) - Kernel configuration : none. Run manually 'make *config' in kernel source tree - Kerrighed module : yes - libkerrighed : yes - Kerrighed tools : yes - Kerrighed tests : yes ********************************************************************
make defconfig
# cd kernel # make menuconfig
I added support for many network cards available in 2.6.20 as module and configure built-in kernel for network card I use in cluster like sis900[*] e1000e[*] and [M] for others type which aren't selected as default. [ Device Drivers - Network device support - Ethernet (10 or 100Mbit|Ethernet 1000Mbit ]
cd .. make kernel
or
sudo vim /etc/kernel-pkg.conf make-kpkg --initrd --revision=2.6.20-svn-022009-1 kernel_image kernel_headers
make kernel-install
or
cd .. sudo dpkg -i linux-image-2.6.20-krg_2.6.20-svn-022009-1_i386.deb
make
NOTES: kerrighed modules are compiled with version 2.6.20-krg, if you want to append-version with make-kpkg, just change the version in kerrighed-2.2.1.
make install
dpkg -P linux-image-2.6.26-1-686 linux-image-2.6-686
terdapat satu komputer yang akan menyimpan image sistem dan aplikasi dan juga media penyimpan dan lain-lain seperti repo, wiki, demo, hasil
vim /etc/network/interfaces
auto lo eth1 iface lo inet loopback iface eth1 inet static address 192.168.0.11 netmask 255.255.255.0
ENABLE=true # If kerrighed has this feature LEGACY_SCHED=true
configfs /config configfs defaults 0 0
session=1 nbmin=2 192.168.0.11:11:eth1 192.168.0.12:12:eth0 192.168.0.13:13:eth0 192.168.0.14:14:eth0 192.168.0.15:15:eth0
title Debian GNU/Linux, kernel 2.6.20-krg root (hd0,3) kernel /boot/vmlinuz-2.6.20-krg root=/dev/sda4 ro session_id=1 node_id=1 initrd /boot/initrd.img-2.6.20-krg
apt-get install atftpd syslinux
timeout 5 # prompt 1 default kerrighed label kerrighed kernel vmlinuz append initrd=initrd root=/dev/nfs nfsroot=192.168.0.11:/NFSROOT/kerrighed ip=dhcp ro session_id=1,rsize=4096,wsize=4096 label local localboot 0
Remove initrd, if you found out a hang state with error message “Wait for root filesystem”. It's in initramfs, I don't know it's buggy or something.
USE_INETD=true OPTIONS="--tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftpboot"
tftp dgram udp4 wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftpboot
ddns-update-style none; option domain-name "lskk.ee.itb.ac.id"; default-lease-time 600; max-lease-time 7200; log-facility local7; option dhcp-max-message-size 2048; # use-host-decl-names on; # deny unknown-clients; deny bootp; next-server 192.168.0.11; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.12 192.168.0.15; filename "/srv/tftpboot/pxelinux.0"; option root-path "192.168.0.11:/NFSROOT/kerrighed"; }
/dev/hda none swap sw 0 0 none /proc proc defaults 0 0 none /var/run tmpfs defaults 0 0 none /var/lock tmpfs defaults 0 0 none /var/log tmpfs defaults 0 0 none /tmp tmpfs defaults 0 0 none /dev/pts tmpfs defaults 0 0 configfs /config configfs defaults 0 0 192.168.0.11:/media/storage /media/storage nfs rw,hard,nolock 0 0 192.168.0.11:/NFSROOT/home /home nfs rw,hard,nolock 0 0
127.0.0.1 localhost 192.168.0.11 krg-01 192.168.0.12 krg-02 192.168.0.13 krg-03 192.168.0.14 krg-04 192.168.0.15 krg-05
session=1 nbmin=2 192.168.0.11:11:eth1 192.168.0.12:12:eth0 192.168.0.13:13:eth0 192.168.0.14:14:eth0 192.168.0.15:15:eth0
/NFSROOT/kerrighed 192.168.0.0/24(ro,async,no_root_squash,no_subtree_check) /media/storage 192.168.0.0/24(rw,async,wdelay,no_root_squash,no_subtree_check) /NFSROOT/home 192.168.0.0/24(rw,async,wdelay,no_root_squash,no_subtree_check)
NFS akan mencoba me-resolve alamat IP ke domain jika ada entri di /etc/hosts<code>/krg-system/ krg*(rw,no_root_squash,no_subtree_check,sync,fsid=1)
Apa yang dilakukan di sistem server network booting, lakukan juga pada NFSROOT
Boot with PXE or gPXE, suite to your network card. Download compiled gPXE/etherboot from rom-o-matic.net
tg3, sis900, rtl8139
groupadd nobody fork-test
apt-get install cpuburn chroot /NFSROOT/kerrighed/ apt-get install cpuburn burnMMX & # 3-4 times :-)
Blender+OpenMP copy install/ blender to $HOME apt-get install libjpeg62
mencoder -mf on:w=640:h=480:fps=12 -ovc copy -o output.avi \*.jpg
ssh-keygen cp .ssh/id_rsa.pub /NFSROOT/kerrighed/home/stwn/.ssh/authorized_keys chroot /NFSROOT/kerrighed/ su stwn ssh-keygen <Ctrl-D> cp /NFSROOT/kerrighed/home/stwn/.ssh/id_rsa.pub /home/stwn/.ssh/authorized_keys
P4_RSHCOMMAND=ssh
krg-node0 krg-node1
mpirun -np 4 ./Pi
vim cpi.c
gcc cpi.c vim Pi.c mpicc Pi.c ./a.out mpirun -np 24 ./a.out mpirun -np 2 ./a.out mpirun -np 4 ./a.out
OpenMP support in Kerrighed is unknown, people from NCHC said there is no support for OpenMP in Kerrighed based-on reply email from Renauld Lottiaux
gcc-4.2 -fopenmp mm-openmp.c -o mm-openmp
time ./mm-openmp
This simple loop program will test the process migration feature of Kerrighed with kernel 2.6.20.
krgcapset -d +CAN_MIGRATE
loop & loop & loop & loop &
send_kerrighed_signal: 8 (events/0) -> 820741 (loop)
migrate [process-id] [node]
krgadm nodes status
krgadm cluster start krgadm cluster reboot/poweroff krgadm nodes poweroff -n 13
top ps free 'cat /proc/*' kerrighed_nodes kerrighed_session
Null mapping count, non null mapping address : [mem-addr]
Blender uses relatively big data and process, and is this the reason why blender process could not be migrated to another nodes? strongly connected?
Null mapping count, non null mapping address : [mem-addr]
Gave up waiting for root device. Common problems: | Waiting for root filesystem Boot args
mkinitramfs -k `uname -r` -o initrd-2.6.20-krg
jika ingin menghasilkan initramfs secara manual