Sponsored Content
Special Forums Hardware DD command using block device as input Post 302666001 by nytty on Tuesday 3rd of July 2012 01:50:42 PM
Old 07-03-2012
DD command using block device as input

Hi,

I am trying to measure the speed of reading a given block size using the dd command. However depending on which input I use: a regular file (on the same device) or /dev/sdb1, I get some really different results.

Code:
$sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'; dd if=pirate of=/dev/null bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0190755 s, 26.8 kB/s

$sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'; sudo dd if=/dev/sdb1 of=/dev/null bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 1.9649e-05 s, 26.1 MB/s

Note:
- Freshly formated ext4
ATA device, with non-removable media
Transport: Serial, SATA Rev 3.0

- I did the same experiment with varying blocksizes, and up to 128K the phenomena is the same.

- The file pirate is 100G and filefrag reports: 57 extents found

Questions:
- Is this normal?
- I am wondering if the speed of repositioning the disk head to the beginning of a device is fast comparing to any file offset movement. because reading 512B should be elementary ...

Thanks a lot

Last edited by methyl; 07-03-2012 at 07:36 PM.. Reason: please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

what is the command for listing the device specs in solaris

Im looking to get the statistics on a machine memory, cpu speed drive size etc thanks in advance (3 Replies)
Discussion started by: simplimarvelous
3 Replies

2. Solaris

block device problem

Hi ...... I have file system problem when i try to mount get the following message : mount: /dev/rdsk/c1t4d0s7 not a block device .... I run fsck it's ok ,,,, after run newfs -N /dev/dsk/c1t4d0s7 and fsck -o b=535952 /dev/dsk/c1t4d0s7 .............it's ok ........ At the and when i try... (2 Replies)
Discussion started by: tt155
2 Replies

3. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

4. Linux

shrinking root partition and using free space to create a block device

We are intending to protect a set of user specified files using LVM mirroring where the protected space on which the user files are stored is mirrored on an LV on a different disk. Our problem is that for a user with a custom layout has installed linux with 2 partitons for swap and / and there is... (0 Replies)
Discussion started by: kickdgrass
0 Replies

5. Red Hat

How to Block the USB device

Hi friends, I wanna know how to block USB devices in my RedHat flavor Operating system. regards, Prakash (3 Replies)
Discussion started by: prakashkumar41
3 Replies

6. Shell Programming and Scripting

Block device fs vs normal directory

I talked with this guy who seems to think loop mounting a fs ext3 image on a directory, as opposed to just using the underlying filesystem, will work better as far as IO conflicts. I have no idea why this would be better? I haven't been able to contact him. Basically we have a daemon that... (0 Replies)
Discussion started by: stevenswj
0 Replies

7. Linux

Block device fs vs normal directory

I use CentOS I talked with this guy who seems to think loop mounting a fs ext3 image on a directory, as opposed to just using the underlying filesystem, will work better as far as IO conflicts. I have no idea why this would be better? I haven't been able to contact him. Basically we have a... (1 Reply)
Discussion started by: stevenswj
1 Replies

8. Shell Programming and Scripting

tcgetattr: Inappropriate ioctl for device after ssh command

Hello everyone I am finishing a script allowing me to purge logs on multiple servers, i have one last pb with the ssh command.........it is throwing me the following error : tcgetattr: Inappropriate ioctl for device (full screen in attached file 1, full script in attached file 2) It... (15 Replies)
Discussion started by: jimmy75_13
15 Replies

9. UNIX for Advanced & Expert Users

Command to see the logical volume path, device mapper path and its corresponding dm device path

Currently I am using this laborious command lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}' Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies

10. OS X (Apple)

Change Name of Bluetooth Device from Command Line in macOS

Mac Version 10.15.2 (macOS Catalina) Does anyone know how to change the name of a connected bluetooth device from the command line on macOS? I am having trouble with various bluetooth devices which I cannot get the "rename" option in the GUI to "save" properly and so I cannot rename a few... (0 Replies)
Discussion started by: Neo
0 Replies
readdvd(1)							    readdvd 1.0 							readdvd(1)

NAME
readdvd - is creating an image of your source dvd media or medias even if it has / they have corrupted blocks SYNOPSIS
readdvd [-l] [-h] readdvd -d DEVICE1 [-d DEVICE2] [-d ...] -o file.iso [-s #] [-v] [-vv] DESCRIPTION
readdvd reads even a corrupted dvd and writes the the result into a new image file on your harddisk. DEVICE
can be an IDE, SCSI, SATA, USB or FireWire connected optical drive. Not all SATA controller support all Plextor features. Linux: /dev/hdX: IDE device /dev/scdX: Linux 2.4: SATA, SCSI, USB device, or IDE device via ide-scsi emulation /dev/srX: Linux 2.6: IDE device via new ATA layer, SCSI or USB device OpenBSD/NetBSD: /dev/rcdX FreeBSD: /dev/cd: SCSI device /dev/acd: ATA device MacOS X: /dev/disk: win32: C:,D:,E:, ... X:,Y:,Z: OPTIONS
-l scan busses for all available CD and DVD devices -h help shows available options. -o file.iso write data to imagefile named file.iso -s # read source media with selected speed -v use verbose mode -vv use extended verbose mode INTERACTIVE MODUS
q stop reading media and exit w save sector map which is currently read and continue with the next one EXAMPLES
readdvd -d /dev/sr0 -o filename.iso -s 8 -v create an image filename.bin of inserted media in device /dev/sr0 with read speed 8 in verbose mode. please report man page improvements to T.Maguin@web.de Gennady ShultZ Kozlov 10. April, 2009 readdvd(1)
All times are GMT -4. The time now is 06:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy