Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
am calculating throughput for my SD card using "dd" in FC7 2.6.21 kernel.
After mounting the sd card, i run,
:
: time dd if=/dev/zero of=/mnt/sdcard/Myfile.txt bs=512
: count=20480;umount /mnt/sdcard;
: 20480+0 records in
: 20480+0 records out
: 10485760 bytes (10 MB) copied, 0.0658825 s, 159 MB/s
:
: real 0m0.097s
: user 0m0.013s
: sys 0m0.055s
But the throughput shown(159 MB/s) exceeds the throughput of SD specification.
Is it a normal behaviour? What is happening while dd?? Has the data been actually written in the SD card??
Can u pls comment on this??
All the data may not be written into the SD card until a sync is issued, un-mounting the device etc. Could you please try "sync" command and let us know the result.
Hi Suresh,
Thanks for ur reply.
Here is the output with sync.
I tried with sync and umount. It also produces higher number of throughputs..
time dd if=/dev/zero of=/mnt/sdcard/Myfile.txt bs=512 count=204800;sync;
204800+0 records in
204800+0 records out
104857600 bytes (105 MB) copied, 0.720001 s, 146 MB/s
real 0m0.724s
user 0m0.115s
sys 0m0.554s
Am not sure why such higher numbers are got for SD card??
Pls help.
I think you are probably seeing a cache issue. Try(as root) using hpdarm -tT /dev/sda (or whatever your sd device is ). The -tT should account for the cache.
Amio,
I don't have a disk to try it. But just for a experiment, can you try the two command's in a shell script and time the script. I have a small doubt in the numbers. This is to see a comparative numbers with your previous post.
As mentioned by lazlow you can try "hdparm" utility also.
Suresh Maniyath
Last edited by Suresh Maniyath; 03-06-2009 at 02:56 AM.
After mounting the sd card, i run,
:
: time dd if=/dev/zero of=/mnt/sdcard/Myfile.txt bs=512
: count=20480;umount /mnt/sdcard;
: 20480+0 records in
: 20480+0 records out
: 10485760 bytes (10 MB) copied, 0.0658825 s, 159 MB/s
:
: real 0m0.097s
: user 0m0.013s
: sys 0m0.055s
But the throughput shown(159 MB/s) exceeds the throughput of SD specification.
Is it a normal behaviour? What is happening while dd?? Has the data been actually written in the SD card??
Can u pls comment on this?
==========
AMIO.PRABA:
There is nothing wrong with your data. Don't worry.
The 159 MB/s is not the size of either your device or the reading. dd does not make pretentions. In your posted data it is very clear that
: 20480+0 records in
: 20480+0 records out
: 10485760 bytes (10 MB) copied
Thats exactly what it is.
The 159 MB/s is the speed in Mega-Bytes-Per-Second that the records were gathered in and accounted out.
So it is only the speed of recording, not the size of device volume.
Go in peace.
Hope this helps.
Last edited by malekmustaq; 03-14-2009 at 12:43 AM.
You do not want to go that deep into the system (/dev/BlockDev0. At the command line simply type mount. This will give you where the system thinks everything is mounted. That is the point you want to run the hdparm test to.
Quote:
[fred@localhost ~]$ mount
/dev/hda2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda5 on /home type ext3 (rw)
/dev/hda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda2 on /media/Storage type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/sdb1 on /media/FEDORA type vfat (rw,noexec,nosuid,nodev,shortname=winnt,uid=500)
In this case (above) you can tell that /dev/sdb1 is the one I would want to run the test on(linked to /media/FEDORA). /media/something is the standard mount point on Fedora for removable media. Depending on your system I would expect your test to be in the /dev/sdX1 format(X=a,b,c,d,...)
Hi Lazlow,
Mount on my system showed /dev/Blockdev0p1 on /mnt/sdcard type ext2 (rw)
I tried "hdparm -tT /dev/BlockDev0p1". But i still get "Inappropriate ioctl for device"..
Are these errors need to be taken into account? Or fine to ignore these??
That is very strange (/dev/BlockDev0p1). Since FC4 on all my different machines(50+ machines over the years) they have always mounted in the /dev/sdX1 format. Are you manually mounting it by any chance?
I THINK there are a few layers that are normally between the block device and the normal device. Skipping those layers MAY be the reason for the error you are seeing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.