Pages

Showing posts with label dreamplug. Show all posts
Showing posts with label dreamplug. Show all posts

Sunday, 21 April 2013

Badblocks run time (Dreamplug + USB)

So I put my hands on two seagate external hard drives (2T), and I want to use them as a raid device. Prior using the drives, I like to run some checks on them, to see if they deserve my data to be put on them. I ran badblocks on both drives at the same time. I don't think, that it has any impact on the speed. To record how much time did it take to run badblocks on 2T drives connected through USB to my Dreamplug, I captured some outputs:
root@plugged:~# badblocks -b 1048576 -w -o badblocks.W1E2JW11 -s -v /dev/sdc
Checking for bad blocks in read-write mode
From block 0 to 1907728
Testing with pattern 0xaa: done                                
Reading and comparing: done                                
Testing with pattern 0x55:  77.39% done, 92:31:15 elapsed
root@plugged:~# badblocks -b 1048576 -w -o badblocks.W1E2GMMM -s -v /dev/sdd
Checking for bad blocks in read-write mode
From block 0 to 1907728
Testing with pattern 0xaa: done                                
Reading and comparing: done                                
Testing with pattern 0x55: done                                
Reading and comparing: done                                
Testing with pattern 0xff: done                                
Reading and comparing:   2.04% done, 172:41:55 elapsed
Badblock with these parameters tests 4 patterns: 0xaa, 0x55, 0xff, 0x00. The latter output shows the time required to get to the read-back phase of the second pattern. So let's say the read and write takes up around the same time, meaning we have the time for 5 iterations:
5x = 172
x = 34.4
And for doing all the 8 phases, you will need 275.2 hours, around 11.5 days, let's say 12 days. I am not sure, that this is the most economic way of doing it, because the drives are consuming a lot power, so it might make sense to drive them as fast as possible with a more powerful machine.

Monday, 3 December 2012

NFS installation

So I decided to put an NFS server to my DreamPlug. First, an easy step:
apt-get --no-install-recommends install nfs-kernel-server
Let's see what do I have:
root@plugged:~# lsmod | grep nfs
nfsd                  243695  11 
exportfs                3108  1 nfsd
So, next step is to export a directory. I would like to create a read-only export.
cat /etc/exports
/mnt/md2        192.168.0.2(ro,no_subtree_check)
TODO: Some security Okay, so let's restart the nfs server:
/etc/init.d/nfs-kernel-server stop
/etc/init.d/nfs-kernel-server start
Install the client on the other machine:
sudo apt-get --no-install-recommends install nfs-common
And mount the export:
sudo mount 192.168.0.4:/mnt/md2 /mnt/md2
It does not seem to perform very well. For example, from the client, through wifi:
time ls -la /mnt/md2/1/ > /dev/null
Gives
real 1m18.605s
user 0m0.560s
sys 0m2.632s
Whereas running the same stuff on the DreamPlug:
real 0m2.572s
user 0m1.650s
sys 0m0.920s
And that's fast. Let's try to dd some files.
dd if=/mnt/md2/1/ffc4f5bc7f6b78ac371f3ecebdd9701e4cb8c68f of=/dev/null
Gives:
577409024 bytes (577 MB) copied, 103.255 s, 5.6 MB/s
And what is the raw speed? On the server:
nc -l -p 4545 -q 1 < /mnt/md2/1/ffc4f5bc7f6b78ac371f3ecebdd9701e4cb8c68f
On the client:
nc 192.168.0.4 4545 | dd of=/dev/null
And the results:
577409024 bytes (577 MB) copied, 103.84 s, 5.6 MB/s
So nfs gives almost no overhead. (Please note, that the 1 sec was the waiting time added by the netcat server. That's negligable.) Let's see the same thing locally on the server:
dd if=/mnt/md2/1/ffc4f5bc7f6b78ac371f3ecebdd9701e4cb8c68f of=/dev/null
Result:
577409024 bytes (577 MB) copied, 19.4105 s, 29.7 MB/s
NFS over a gigabit connection (after umount-mount, to clear the cache):
577409024 bytes (577 MB) copied, 24.6491 s, 23.4 MB/s
Without NFS (nc way):
577409024 bytes (577 MB) copied, 20.9865 s, 27.5 MB/s
So yes, NFS has some overhead at these rates.

Saturday, 10 November 2012

Dreamplug - Updated Debian - gpio messages

I updated my dreamplug to the latest debian, and I see these messages in dmesg:
the gpio timer is called ! time is 211
This is somewhat really annoying, so I decided to try to install a fresh debian. The instructions I used for the update are: Update guide

Sunday, 4 November 2012

Dreamplug serial console, plus faster boot

Some months ago, I put my hands on a Dreamplug device. I haven't done too much with it, just put arch on it. Now I decided to log in again, and play around with it. First I need to log in with the serial console. In order to do that, I need to be able to use my serial (ttyUSB0) as a simple user. I first added myself to the dialout group:
sudo gpasswd dialout -a matelakat
And as I don't want to log on/off, I activated the group memberships:
newgrp dialout
And off you go, I just had to start minicom:
minicom
Let's make booting a bit faster. See here. I will make a note of my original bootcommand here (The whole stuff needs to be one line!)
bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1;
 ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel};
 setenv bootargs ${x_bootargs} ${x_bootargs_root};
 bootm 0x6400000;
And so it is modified to:
${x_bootcmd_usb}; ${x_bootcmd_kernel};
 setenv bootargs ${x_bootargs} ${x_bootargs_root};
 bootm 0x6400000;
With this:
Marvell>> setenv bootcmd '${x_bo...
And save the stuff:
Marvell>> saveenv
And reset
Marvell>> reset
So that the device will boot significantly faster.

Thursday, 5 April 2012

Disable mdadm autodetect

I wanted to create a raid array from USB drives. As USB drives are changing, I don't want mdadm to auto-assemble the arrays during system startup.
[root@alarm ~]# cat /etc/mdadm.conf | grep DEVICE
DEVICE /dev/null

Wednesday, 28 March 2012

Dreamplug USB drive performance

I attached an USB drive to my new toy (dreamplug) to see what performance can I expect. Let me share the results:

dreamplug-debian:/mnt/disk# dd if=/dev/zero of=j bs=1024 count=1000000         
1000000+0 records in                                                           
1000000+0 records out                                                          
1024000000 bytes (1.0 GB) copied, 61.06 s, 16.8 MB/s                           
dreamplug-debian:/mnt/disk# dd if=j of=/dev/null bs=1024 count=1000000         
1000000+0 records in                                                           
1000000+0 records out                                                          
1024000000 bytes (1.0 GB) copied, 37.4651 s, 27.3 MB/s                         

I think I am happy with these results. The filesystem was reiserfs.