Tuesday, August 24, 2010

DIY Project



Here

is my latest PC assembly project. I went the "do it yourself" route and I used parts similar to those that I mentioned here. I can't say that it's the cheapest PC out there, though. I see that Staples has an Acer desktop on their ad for $300. I hope that the adage "you get what you pay for" is true because the Staple's system looks to be a good bargain in comparison.

One thing which I was able to test with this system is running from a flash based live Linux distribution. The flash drive holds an 8G image of Slackware 13.1. The image is used as the basis for a device mapper snapshot. The "top" layer is allocated from RAM (tmpfs). By default the Linux kernel will allocate half of RAM for use by tmpfs, about 2G in this case. I used all of that for the snapshot (with loop0 pointing to the allocated file). From my initrd environment, I used this command sequence:


# dd if=/dev/zero of=/tmpfs/z
# losetup -f /tmpfs/z
# echo 0 $(blockdev --getsize /dev/sda1) snapshot /dev/sda1 /dev/loop0 p 32 | dmsetup create top


Note that by using RAM as the top layer, I avoid writing anything at all to flash. This is by design to prevent failures due to too many R/W cycles. In effect the flash layer is readonly; changes go to the top layer. A major benefit of using flash memory for the readonly layer is that it is orders of magnitude faster than optical disc (because optical disc seek time is so very slow.) The technique is described here.

Update: 2010-08-26
Here is some information about the E8400 CPU as seen by the Linux kernel:

bash-4.1$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
stepping : 10
cpu MHz : 3000.068
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
bogomips : 6000.13
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
stepping : 10
cpu MHz : 3000.068
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
bogomips : 5999.07
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

And, some relative scores here.

My next project will most likely be a 64-bit machine for use with VMare ESX or QEMU+KVM. I am looking at a pair of Xeon 5520 CPUs. Or possibly, Xeon 5504 to save some bucks.

Update: 2010-12-01
Check this post for a similar project using flash as a primary storage media.

No comments:

Post a Comment