crafty benchmark

August 13, 2008

Oh another benchmark, using crafty:

crafty << EOF
hash=48M
hashp=8M
show book
egtb=0
mt=1
bench
exit
EOF

Intel Atom 1600MHz

Crafty v20.14 (1 cpus)

White(1): hash table memory = 48M bytes.
White(1): pawn hash table memory = 8M bytes.
White(1): don't show book statistics
White(1): EGTB access enabled
using tbpath=/var/lib/crafty/TB
0 piece tablebase files found
White(1): max threads set to 2
White(1): Running benchmark. . .
......
Total nodes: 37085905
Raw nodes per second: 639412
Total elapsed time: 58

Intel Core 2 1600MHz

Crafty v20.14 (1 cpus)

White(1): hash table memory = 48M bytes.
White(1): pawn hash table memory = 8M bytes.
White(1): don't show book statistics
White(1): EGTB access enabled
using tbpath=/var/lib/crafty/TB
0 piece tablebase files found
White(1): max threads set to 2
White(1): Running benchmark. . .
......
Total nodes: 36881897
Raw nodes per second: 4610237
Total elapsed time: 8


Disk Encryption and the Acer Aspire One

August 13, 2008

The Acer Aspire One 150l comes with a seagate ST9120817AS sata drive.
But unlike the Via C7, the Intel Atom has nothing like padlock.

You can however modprobe

twofish_i586
aes_i586

I forced the intel rng to load after an otr request locked my book for several minutes… haven’t tested yet if it helps.

intel_rng no_fwh_detect=-1

The following benchmarks were not done with great care, they are by no means repsrentative. The system wasn’t in single mode and the tests were only repeated once or twice.

Note: Today, without changing really anything, the pure lvm test get 55mb/s buffered disks reads and the 128bit twofish benchmark 11mb/s

unencryped logical volume

# hdparm -tT /dev/acer150l/home2

/dev/acer150l/home2:
Timing cached reads: 1156 MB in 2.00 seconds = 577.59 MB/sec
Timing buffered disk reads: 110 MB in 3.04 seconds = 36.19 MB/sec

AES 256

# cryptsetup --verbose --verify-passphrase -c aes-cbc-essiv:sha256 --size 256 luksFormat /dev/acer150l/home2
# cryptsetup luksOpen /dev/acer150l/home2 user
# hdparm -tT /dev/mapper/user

/dev/mapper/user:
Timing cached reads: 1178 MB in 2.00 seconds = 588.92 MB/sec
Timing buffered disk reads: 34 MB in 3.13 seconds = 10.86 MB/sec

AES 128

# cryptsetup --verbose --verify-passphrase -c aes-cbc-essiv:sha256 --size 128 luksFormat /dev/acer150l/home2

Timing cached reads: 1118 MB in 2.00 seconds = 559.25 MB/sec
Timing buffered disk reads: 66 MB in 3.04 seconds = 21.69 MB/sec

Twofish 128

# cryptsetup --verbose --verify-passphrase -c twofish-cbc-essiv:sha256 --size 128 luksFormat /dev/acer150l/home2

/dev/mapper/user:
Timing cached reads: 1116 MB in 2.00 seconds = 558.19 MB/sec
Timing buffered disk reads: 34 MB in 3.16 seconds = 10.77 MB/sec

Twofish 256

# cryptsetup --verbose --verify-passphrase -c twofish-cbc-essiv:sha256 --size 256 luksFormat /dev/acer150l/home2

/dev/mapper/user:
Timing cached reads: 1124 MB in 2.00 seconds = 562.16 MB/sec
Timing buffered disk reads: 34 MB in 3.14 seconds = 10.83 MB/sec


jmb38x script on acer aspire one

August 11, 2008

I took a long look at the original jmb38x_d3e.sh from linpus linux lite and did some modifications.
If you start it with ‘watch’ it will put the card into powersaving (d3e?) mode, only if the laptop is on battery and no cards have been inserted.
I still have to suspend/resume before any cards, inserted after boot, are recognized.

#!/bin/bash
logger="/usr/bin/logger -t jmb38x"
lsmod="/sbin/lsmod"

# Setup delay time (minutes)
delay=5

function chk_pciehp ()
{
check=`$lsmod | grep pciehp`
if [ -z "$check" ] ; then
$logger "Loading PCIe Hotplug driver..."
modprobe pciehp
else
$logger "PCIe Hotplug driver already loaded."
fi
}

function scan_dev ()
{
i=1
host=`lspci -d 197b:2382 | wc -l`
while [ $i -le $host ]
do
dev[$i]=`lspci -d 197b:2382 | awk '{print $1}' | head -n$i | tail -n1`
# echo ${dev[$i]}
i=`echo "$i+1" | bc`
done
}

function d3e ()
{
i=1

while [ $i -le $host ]; do
dev=${dev[$i]}
if [ -z "$dev" ] ; then
$logger "JMicron JMB38x not found!"
else
# d3e = powermanagemnt??
if lspci -s $dev -xxx | grep e0: | awk '{print $3}' | egrep -q "^[0-f]c$"; then
setpci -s $dev D4=10:F0
setpci -s $dev AD=FF
setpci -s $dev AE=69
$logger "JMB38X D3e function is enabled!"
else
$logger "There is a card inserted!"
fi
fi
i=`echo "$i+1" | bc`
done
}

function remove_mmc_modules ()
{
$logger "removing modules!"
rmmod sdhci
rmmod mmc_block
rmmod mmc_core
}

function enable_mmc_modules ()
{
for mod in mmc_core mmc_block sdhci; do
if ! $lsmod | grep -q $mod; then
$logger "enabling $mod"
modprobe $mod
fi
done
}

function poll ()
{
i=1
time=`echo "$delay*60" | bc`
while :
do
scan_dev
if [ -f /sys/bus/usb/devices/1-5/power/level ]; then
echo auto > /sys/bus/usb/devices/1-5/power/level
fi

if [ -f /sys/bus/usb/devices/5-5/power/level ]; then
echo auto > /sys/bus/usb/devices/5-5/power/level
fi
sleep $time

# laptop on battery and no card inserted => d3e
if /usr/bin/acpi -a | grep -q " off-line$"; then
d3e
else
enable_mmc_modules
fi
done
}

function main ()
{
chk_pciehp
poll
}

case "$1" in
watch)
main
;;
start)
chk_pciehp
enable_mmc_modules
;;
stop)
remove_mmc_modules
;;
restart)
remove_mmc_modules
enable_mmc_modules
;;
*)
echo "usage: $0 [watch|start|stop|restart]"
exit 1
;;
esac


linpus linux goodbye

August 10, 2008

Well, the preinstalled linpus linux kind of died on me. I tried to install debian over usb, but 64mb is not enough. I tried PXE, which worked fine. But debian stable crashed while installing (kernel too old), debian testing didn’t boot, because of kernel oops on realtek nic module (kernel too new), debian unstable is the same netboot.tar.gz as testing.

Ubuntu PXE install worked just fine (kernel messed up just right).

Currently I’m copying useful stuff from the old linpus linux to make everything work again.

This is the most advanced guide i found  https://help.ubuntu.com/community/AspireOne


I created two scripts:

/etc/init.d/local-acer, using the strange jmb38x_d3e.sh from the original linpus

#!/bin/sh
# /etc/rc2.d/S99local-acer
setpci -d 197b:2381 AE=47
/opt/aspire/sbin/jmb38x_d3e.sh > /dev/null 2>&1 &

/usr/bin/setkeycodes e025 130
/usr/bin/setkeycodes e026 131
/usr/bin/setkeycodes e027 132
/usr/bin/setkeycodes e029 133
/usr/bin/setkeycodes e071 134
/usr/bin/setkeycodes e072 135
/usr/bin/setkeycodes e055 159
/usr/bin/setkeycodes e056 158

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
echo 20 > /proc/sys/vm/dirty_ratio
echo 10 > /proc/sys/vm/dirty_background_ratio
echo auto > /sys/bus/usb/devices/1-2/power/level
echo auto > /sys/bus/usb/devices/5-5/power/level


/etc/init.d/local-setup-volatile.sh, corresponding to the volatile instructions on http://wiki.debian.org/DebianAcerOne

#!/bin/sh
# /etc/rcS.d/S36local-setup-volatile.sh
error() {

echo $1; exit 1

}

echo "Setting up /var/volatile..."

mount -t tmpfs none /var/volatile || error "Could not mount /var/volatile!!!"

for i in local log mail spool; do
mkdir -p /var/volatile/$i
done

mkdir -p /var/log/gdm
mkdir -p /var/log/fsck
mkdir -p /var/log/apt
mkdir -m 1730 -p /var/spool/cron/crontab

touch /var/log/dmesg
touch /var/log/lastlog
(touch /var/run/utmp && chown root.utmp /var/run/utmp && chmod 664 /var/run/utmp)&

#ln -s /var/apt /var/cache/apt
#for i in debconf jockey hald ldconfig man system-tools-backends; do
#  mkdir -p /var/cache/$i
#done

exit 0


acer aspire one 150L

August 9, 2008

Clicked myself an Acer Aspire One 150l yesterday. I just unpacked it this morning.
After my thinkpad x30 I didn’t really want to go with small laptops again, but the acer is so damn cute.  I would have bought a pink one, or at least a white one, but pink isn’t available and everyone wants a white acer, so i had to buy blue. pink is great, pop is good for you.

Hardware

I really like the hardware, 120gb SATA drive, 1GB ram. Other netbooks in the same class come with Windows XP, but there is no microsoft tax on the A150L.
Well, the fan is kind of loud. I tried to update the bios using http://unetbootin.sourceforge.net/ and an usb stick, but xxd diff shows no difference to the original bios. So i guess i’ll have to wait for a better one.
The display is great, brilliant colors and not wobbly like the msi winds, judging from the reviews on youtube. Touchpads make me feel uncomfortable, but no one likes trackpoints anymore, guess i’ll have to learn some mad touchpad skillz.

Linux

Once inside the linplus lite linux I activated xfces right-click menu, installed a modern terminal and pulled some software with yum and pirut.
Since my last redhat admin job in 2001, I forgot about redhats rpm format being a total waste of time. Maybe i thought yum might be to rpm what apt was to deb, but it really isn’t.
Anyway i don’t want to waste all this nice acer addons, the desktop is great. Maybe i’ll port some of it to debian (http://wiki.debian.org/DebianAcerOne).

Oh, about acers linplus lite linus:
* the ‘acer root’ hack actually consists of pressing alt-f2 and using sudo in a xterm
* the mail client is not really good with imap, no folder support… evolution isn’t installable because of some fc8 gnome dependency vs acer package conflict
* bootblock is lilo.. and why is there a ntfs bootblock on /dev/sda1
* only one 120gb partition on sata drive, but home mounted with aufs
* xfce compiz looks great though
* no firefox3, which is a real dealbreaker, well, and the fan
* no shadow passwords enabled
* X listening on port 6000…
* root actually uses a md5 password.
* no ipv6 support in kernel
* default screensaver kind of lame

I installed ssh, zsh and some other usefull packages (wireshark, lsof, …)

Benchmark

Simple benchmark using john the ripper, 1.7.0.2 installed from repository

Benchmarking: Traditional DES [64/64 BS MMX]... DONE
Many salts:salts396480 c/s real, 405398 c/s virtual
Only one salt:salt353213 c/s real, 359674 c/s virtual

Benchmarking: BSDI DES (x725) [64/64 BS MMX]... DONE
Many salts:salts13438 c/s real, 13768 c/s virtual
Only one salt:salt13374 c/s real, 13675 c/s virtual

Benchmarking: FreeBSD MD5 [32/32]... DONE
Raw:Raw3817 c/s real, 4000 c/s virtual

Benchmarking: OpenBSD Blowfish (x32) [32/32]... DONE
Raw:Raw199 c/s real, 202 c/s virtual

Benchmarking: Kerberos AFS DES [48/64 4K MMX]... DONE
Short:Short128357 c/s real, 130705 c/s virtual
Long:Long343500 c/s real, 351227 c/s virtual

Benchmarking: NT LM DES [64/64 BS MMX]... DONE
Raw:Raw3380K c/s real, 3478K c/s virtual

Follow

Get every new post delivered to your Inbox.