07-03-2012
Quote:
Originally Posted by
nytty
Alright, I get your point. I though that using /dev/sdb1 moves to position 0
AFAIK hdparm only gives you the speed of the disk and not the time of reading a given amount of data.
Do a little math. x megabytes per second is 1/x seconds per megabyte.
Quote:
So far with my tests I find that reading 16kb takes about the same time as reading 512b.
Disks do read-ahead for you. Disks transfer to the host in larger bundles than 512 bytes anyway. Disks even do their own
caching which the OS has no control over, which is going to throw off all your results supremely.
Too bad there isn't a tool which can tell you more about what your disk's doing, test uncached reads, or even configure hardware read-ahead to your preference... something like hdparm...
Quote:
I need this information to set the optimal page size of my system (oracle and mysql suggest these sizes)
Tell me exactly what they're asking you. I suspect you've gotten it a bit mixed up.
Quote:
Can you elaborate on why dropping the caches is a bad idea?
Because it's not realistic. Your system needs cache to work. Disk speeds are going to be awful without it.
Quote:
How about this sudo procedure:
- drop_caches
- flush disk-cache with hdparm
- make sure dd is in memory
- position the read head randomly on disk
- with DD: read X amount of bytes from the beginning of my file (this is timed)
Same problem as the exact same thing you did before. YOu're running huge programs to do tiny things and your results are going to be meaningless.
Last edited by Corona688; 07-03-2012 at 04:51 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
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
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
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
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
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
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
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
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)
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
RAW(8) System Manager's Manual 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, with 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 Set query mode. raw will query an existing binding instead of setting a new one.
-a With -q , specifies that all bound raw devices should be queried.
-h provides a usage summary.
BUGS
The Linux dd (1) command should be used without 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/.
Version 0.1 Aug 1999 RAW(8)