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
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT BSD
rl
RL(4) Kernel Interfaces Manual RL(4)NAME
rl - RL-11/RL01, RL02 moving-head disk
SYNOPSIS
/sys/conf/SYSTEM:
NRL rl_drives # RL01/02
/etc/dtab:
#Name Unit# Addr Vector Br Handler(s) # Comments
rl ? 174400 160 5 rlintr # rl-01/02
major device number(s):
raw: 16
block: 7
minor device encoding:
bits 0007 specify partition of RL drive
bits 0070 specify RL drive
DESCRIPTION
The block files access the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk
records. There is also a `raw' interface which provides for direct transmission between the disk and the user's read or write buffer. A
single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are
transmitted. The names of the raw files conventionally begin with an extra `r.'
In raw I/O the buffer must begin on a word (even) boundary, and counts should be a multiple of 512 bytes (a disk sector). Likewise seek
calls should specify a multiple of 512 bytes.
DISK SUPPORT
The RL01 drives are each 10240 blocks long and the RL02 drives are 20480 blocks long.
On a RL02 there is room for a full sized root ('a') partition and a reasonable sized swap ('b') partition. The RL01 can only (realisti-
cally) have a single 5mb partition.
FILES
/dev/rl[0-3][a-h] block files
/dev/rrl[0-3][a-h] raw files
/dev/MAKEDEV script to create special files
/dev/MAKEDEV.local script to localize special files
SEE ALSO hk(4), ra(4), ram(4), rk(4), rp(4), rx(4), si(4), xp(4), dtab(5), autoconfig(8)DIAGNOSTICS
rl%d: hard error sn%d cs=%b da=%b. An unrecoverable error occurred during transfer of the specified sector of the specified disk. The
contents of the two error registers are also printed in octal and symbolically with bits decoded. The error was either unrecoverable, or a
large number of retry attempts could not recover the error.
rl%d: hard error sn%d mp=%b da=%b. An unrecoverable drive error occured during transfer of the specified sector of the specified disk.
The contents of the two error registers are also printed in octal and symbolically with bits decoded. The error was either unrecoverable,
or a large number of retry attempts could not recover the error.
rl%d: write locked. The write protect switch was set on the drive when a write was attempted. The write operation is not recoverable.
rl%d: can't get status. A ``get status'' command on the specified drive failed. The error is unrecoverable.
BUGS
In raw I/O read and write(2) truncate file offsets to 512-byte block boundaries, and write scribbles on the tail of incomplete blocks.
Thus, in programs that are likely to access raw devices, read, write and lseek(2) should always deal in 512-byte multiples.
DEC-standard error logging should be supported.
A program to analyze the logged error information (even in its present reduced form) is needed.
3rd Berkeley Distribution August 20, 1987 RL(4)