Results tagged “Debian”

For a long time, I was looking for PowerPC machine to run Linux on it. I was planning to buy some PowerBook when I get good offer, but that opportunity never really came.

Playstation 3 hardware

Meantime, Sony has been reducing price of PlayStation 3 up to point where they don't include hyper-visor which is a shame. (also known as Other OS support). If I wanted to run Linux on it, I was running out of time. So, I decided to take a leap of fate and buy one 40Gb (CECHGxx) model for ~240 € which seemed like a good price for PowerPC at 3.2GHz with 256 Mb RAM and slowish disk:

dpavlin@ps3:~$ cat /proc/cpuinfo 
processor       : 0
cpu             : Cell Broadband Engine, altivec supported
clock           : 3192.000000MHz
revision        : 16.0 (pvr 0070 1000)

processor       : 1
cpu             : Cell Broadband Engine, altivec supported
clock           : 3192.000000MHz
revision        : 16.0 (pvr 0070 1000)

timebase        : 79800000
platform        : PS3
model           : SonyPS3
dpavlin@ps3:~$ free
             total       used       free     shared    buffers     cached
Mem:        213728      63372     150356          0       2608      25212
-/+ buffers/cache:      35552     178176
Swap:       586332          0     586332
root@ps3:~# hdparm -tT /dev/ps3da

/dev/ps3da:
 Timing cached reads:   1640 MB in  2.00 seconds = 819.90 MB/sec
 Timing buffered disk reads:   82 MB in  3.02 seconds =  27.17 MB/sec
You will not get access to graphic cards, but you can use it's 256 Mb of VRAM (DDR3) as block device, but it's also not very fast:
root@ps3:~# hdparm -tT /dev/ps3vram 

/dev/ps3vram:
 Timing cached reads:   1682 MB in  2.00 seconds = 841.64 MB/sec
 Timing buffered disk reads:   96 MB in  3.06 seconds =  31.40 MB/sec

root@ps3:~# dd_rescue -m 236M /dev/zero /dev/ps3vram
Summary for /dev/zero -> /dev/ps3vram:
dd_rescue: (info): ipos:    241664.0k, opos:    241664.0k, xferd:    241664.0k
                   errs:      0, errxfer:         0.0k, succxfer:    241664.0k
             +curr.rate:    15911kB/s, avg.rate:    15669kB/s, avg.load:  7.4%

root@ps3:~# dd_rescue -m 236M /dev/ps3vram /dev/zero
Summary for /dev/ps3vram -> /dev/zero:
dd_rescue: (warning): /dev/zero (241664.0k): Invalid argument!    
dd_rescue: (info): ipos:    241664.0k, opos:    241664.0k, xferd:    241664.0k
                   errs:      0, errxfer:         0.0k, succxfer:    241664.0k
             +curr.rate:    32621kB/s, avg.rate:    31898kB/s, avg.load: 14.8%
Normal usage is as swap (with higher priority than disk), but this basically just saves disk from spinning because disk is faster at writing (which you really care about if you are swapping to media) but slower at reading:
root@ps3:~# dd_rescue -m 236M /dev/zero /tmp/disk.speed.test
Summary for /dev/zero -> /tmp/disk.speed.test:
dd_rescue: (info): ipos:    241664.0k, opos:    241664.0k, xferd:    241664.0k
                   errs:      0, errxfer:         0.0k, succxfer:    241664.0k
             +curr.rate:    18400kB/s, avg.rate:    18392kB/s, avg.load: 19.2%

root@ps3:~# dd_rescue -m 236M /dev/zero /tmp/disk.speed.test
Summary for /tmp/disk.speed.test -> /dev/zero:
dd_rescue: (warning): /dev/zero (241664.0k): Invalid argument!    
dd_rescue: (info): ipos:    241664.0k, opos:    241664.0k, xferd:    241664.0k
                   errs:      0, errxfer:         0.0k, succxfer:    241664.0k
             +curr.rate:    24036kB/s, avg.rate:    22819kB/s, avg.load:  4.7%
Good news is that USB disks are almost as fast as internal drive:
root@ps3:~# hdparm -tT /dev/sdb

/dev/sdb:
 Timing cached reads:   1740 MB in  2.00 seconds = 870.84 MB/sec
 Timing buffered disk reads:   72 MB in  3.01 seconds =  23.89 MB/sec
Having said that, it's probably one of best machines I saw after my first Alpha :-). It's quiet, all hardware available is supported under Linux and provides great platform for PowerPC development.

Ethernet, on the other hand is fastest way to get data to or from machine:

root@ps3:~# nc -l -p 8888 < /dev/zero

root@t61p:~# nc 192.168.2.103 8888 | dd_rescue -m 1G - /dev/null
Summary for - -> /dev/null:
dd_rescue: (warning): /dev/null (1048576.0k): Invalid argument!    
dd_rescue: (info): ipos:   1048576.0k, opos:   1048576.0k, xferd:   1048576.0k
                   errs:      0, errxfer:         0.0k, succxfer:   1048576.0k
             +curr.rate:        0kB/s, avg.rate:    86905kB/s, avg.load: 12.4%
root@t61p:~# nc -l -p 8889 < /dev/zero

root@ps3:~# nc 192.168.2.61 8889 | dd_rescue -m 1G - /dev/null
Summary for - -> /dev/null:
dd_rescue: (warning): /dev/null (1048576.0k): Invalid argument!    
dd_rescue: (info): ipos:   1048576.0k, opos:   1048576.0k, xferd:   1048576.0k
                   errs:      0, errxfer:         0.0k, succxfer:   1048576.0k
             +curr.rate:        0kB/s, avg.rate:    68914kB/s, avg.load: 21.2%

What about graphics?

Basic support is frame-buffer in various resolutions over HDMI (I can't really test compost output). ps3-video-mode -m 130 is something you will type often if you are sitting away from your 1920x1200 LCD...

There is sample code to run RSX from 2007, but it doesn't seem it had any changes since then. There is also libps3rsx and video of it looks promising. It's also from 2007. And it seems you need firmware older than 2.10 which I don't have. Forum thread PS3 Development seems to be dead, but RSX page on wiki is nice overview.

Different approach is to use 6 available SPU cores for YUV to ARGB conversions with scaling. There is also patch for console mplayer -vo to enable movie decoding usable under Linux using SPUs. There is Debian packages for xserver-xorg-video-spu but for sid and it doesn't work for me (next step: recompile).

What about cells?

I still don't know. But, following projects also look very interesting:

Debian installation

I tried to install Debian following instructions for squeeze but between fighting with Sony menu (which I didn't like when I saw it first time on PSP) and trying to type of wireless keyboard which had incredibly short repeat key I wasn't successful. So I tried Debian Live for PS3 and it worked. apt-get dist-upgrade and few hours later I had 2.6.31.1 from www.kernel.org working.

In my continuous quest to endless disk storage, I have ordered two D-Link DNS-323 NAS devices. Since this is my second NAS device (first was DSM-G600 which is PowerPC) I have some experience, so let's see what is inside this (big, black, heavy, metal) box.

dlink-DFDADE:~# uname -a
Linux dlink-DFDADE 2.6.12.6-arm1 #30 Mon Aug 18 14:19:14 CST 2008 armv5tejl GNU/Linux

dlink-DFDADE:~# free
            total      used      free    shared   buffers    cached
Mem:        61904     54808      7096         0     11824     30592
-/+ buffers/cache:     12392     49512
Swap:     1060208         0   1060208

dlink-DFDADE:~# cat /proc/cpuinfo 
Processor      : ARM926EJ-Sid(wb) rev 0 (v5l)
BogoMIPS       : 331.77
Features       : swp half thumb fastmult edsp java 
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant    : 0x0
CPU part       : 0x926
CPU revision   : 0
Cache type     : write-back
Cache clean    : cp15 c7 ops
Cache lockdown : format C
Cache format   : Harvard
I size         : 32768
I assoc        : 1
I line length  : 32
I sets         : 1024
D size         : 32768
D assoc        : 1
D line length  : 32
D sets         : 1024

Hardware       : MV-88fxx81
Revision       : 0000
Serial         : 0000000000000000
So, it's a 330 Mhz ARM with 64Mb or RAM (expandable to 128Mb with SMT soldering, sic!) and a disk. D-Link provided firmware has oldish 2.6.12.6 kernel and usb modules just for printer support. Even worse (than usb keychains or wifi dongles not working) is RAID performance: in RAID0 (which is called performance by firmware) I get 32 Mb/s from single disk and just 37 Mb/s from stripe.

But, all is not bad, because we can install full Debian on DNS-323 which brings us latest software which is just apt-get away, LVM, and support for various recent hardware.

After flashing, and updating to latest Debian arm kernel for orion platform I got 44 Mb/s from single disk and 42 Mb/s from RAID0. So I'm really hitting some bus bandwidth problem somewhere... Even worse, RAID1 is just 36 Mb/s, suggesting that 330 Mhz arm just can't keep up with pair or 1.5Tb SATA drives connected to it.

Next logical step would be to think about a way to use drives individually, because aggregating them on device doesn't make sense. With 220 Mb/s bandwidth on network (which is supposedly 1 Gb/s, sic!) it should be possible to get 44 Mb/s of disk speed onto another machine. I tried vblade which provides AoE server in user-space and it's slow: just 8 Mb/s to directly connected ThinkPad over cross cable.

I will test NFS (and CIFS if everything else fails), but I can guess that I will end up using this device for incremental backup dumps on top of ext4 or maybe nilfs. We'll see...

Update: I didn't choose DSM-323 randomly. When I was deciding which NAS device to buy, I watched Debian on Network Storage Devices and Other Devices which is embedded below for your viewing pleasure (download hi-res version). Orion related stuff starts at about 13:50.