Sponsored Content
Full Discussion: Transfer Rate Disk
Top Forums UNIX for Dummies Questions & Answers Transfer Rate Disk Post 302505635 by Corona688 on Thursday 17th of March 2011 01:16:04 PM
Old 03-17-2011
dd is a general purpose data moving command. It's sometimes used for moving data from one raw disk to another but it's a flexible command and doesn't care what kind of files or devices it's talking to.

dd by itself just reads stdin and writes back to stdout, so dd < filename > newfile is effectively the same thing as cp.

It does it in blocks of 512 bytes by default, which is a bit inefficient, so dd bs=1048576 < filename > newfile may be much faster. Beyond a certain point making the buffer bigger doesn't help.

So all I'm doing is having dd read from one file and write to another, and while it's running, sending it the signal SIGUSR1 which casues it to print statistics. Or you could wait for it to end, or kill it with ctrl-C, and it'll print statistics as it ends.

cache effects are when the OS doesn't immediately store what you've written to file on disk, just in memory. This is great for programs since they don't have to wait for the disk to catch up but troublesome for benchmarks. dd in linux supports the oflag=sync option to tell it not to do that.
This User Gave Thanks to Corona688 For This Post:
 

3 More Discussions You Might Find Interesting

1. HP-UX

HP UX disk io rate question

I only have two disk in my HP machine but when i execute iostat command device bps sps msps c0t0d1 0 0.0 1.0 disk0 49 2.8 1.0 disk5 0 0.0 1.0 I didn't know where device name disk0 and disk5 device name disk0 disk5 ,it is really disk or... (3 Replies)
Discussion started by: alert0919
3 Replies

2. UNIX for Dummies Questions & Answers

Very SLOW STFTP transfer rate

Hi, I am experiencing extremely show transfer rates when transferring zip files over SFTP. Over FTP it works fine. I have disabled compression in the sshd_config file but that does not seem to help.. Any ideas? (0 Replies)
Discussion started by: mojoman
0 Replies

3. UNIX for Advanced & Expert Users

Limit transfer speed rate by iptables Rules

I have D-Link Router DSL-2730U that support busybox OS and iptables version 1.4.0 I managed successfully to block the host for being connect to the internet using the following command block by ip address iptables -I FORWARD -d 192.168.1.6 -j DROP Or By mac source iptables -I... (0 Replies)
Discussion started by: iLinux85
0 Replies
RAW(8)							       System Administration							    RAW(8)

NAME
raw - bind a Linux raw character device SYNOPSIS
raw /dev/raw/raw<N> <major> <minor> raw /dev/raw/raw<N> /dev/<blockdev> raw -q /dev/raw/raw<N> raw -qa DESCRIPTION
raw is used to bind a Linux raw character device to a block device. Any block device may be used: at the time of binding, the device driver does not even have to be accessible (it may be loaded on demand as a kernel module later). raw is used in two modes: it either sets raw device bindings, or it queries existing bindings. When setting a raw device, /dev/raw/raw<N> is the device name of an existing raw device node in the filesystem. The block device to which it is to be bound can be specified either in terms of its major and minor device numbers, or as a path name /dev/<blockdev> to an existing block device file. The bindings already in existence can be queried with the -q option, which is used either with a raw device filename to query that one device, or with the -a option to query all bound raw devices. Unbinding can be done by specifying major and minor 0. Once bound to a block device, a raw device can be opened, read and written, just like the block device it is bound to. However, the raw device does not behave exactly like the block device. In particular, access to the raw device bypasses the kernel's block buffer cache entirely: all I/O is done directly to and from the address space of the process performing the I/O. If the underlying block device driver can support DMA, then no data copying at all is required to complete the I/O. Because raw I/O involves direct hardware access to a process's memory, a few extra restrictions must be observed. All I/Os must be cor- rectly aligned in memory and on disk: they must start at a sector offset on disk, they must be an exact number of sectors long, and the data buffer in virtual memory must also be aligned to a multiple of the sector size. The sector size is 512 bytes for most devices. OPTIONS
-q, --query Set query mode. raw will query an existing binding instead of setting a new one. -a, --all With -q , specify that all bound raw devices should be queried. -h, --help Display help and exit. -V, --version Display version information and exit. BUGS
The Linux dd(1) command should be used without the bs= option, or the blocksize needs to be a multiple of the sector size of the device (512 bytes usually), otherwise it will fail with "Invalid Argument" messages (EINVAL). Raw I/O devices do not maintain cache coherency with the Linux block device buffer cache. If you use raw I/O to overwrite data already in the buffer cache, the buffer cache will no longer correspond to the contents of the actual storage device underneath. This is deliberate, but is regarded either a bug or a feature depending on who you ask! AUTHOR
Stephen Tweedie (sct@redhat.com) AVAILABILITY
The raw command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux August 1999 RAW(8)
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy