Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Writing file to disk takes time Post 37265 by Perderabo on Monday 16th of June 2003 07:36:00 AM
Old 06-16-2003
Unix has a buffer cache which is a very large chunk of main memory.

When you issue a disk read, unix sees if the data is already in the buffer cache, if so no i/o occurs, the data is just moved into your program's buffer. When you issue a write, the data is just moved into the buffer cache.

The system periodicly scans the buffer cache and flushes new data to disk. This is called "write-behind". The system also predicts data that you are likely to need and issues reads to get the data into the buffer cache before your program wants it. This is called "read-ahead".

Read-ahead and write-behind work so well that most disk i/o is reduced to just moving data in memory.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

why shell scripting takes more time to read a file

i have done a coding in shell scripting which reads a file line by line and does something....it takes more than 30 seconds to execute for a single file. when i do the same with perl scripting it takes less than a second. is that shell scripting is not efficient while working with large number of... (1 Reply)
Discussion started by: brkavi_in
1 Replies

2. Solaris

takes time to connect my application

getting delayed to connect to my database in solaris Does anyone help me to get out of this issue help will be more appreciated. (2 Replies)
Discussion started by: Gods_help
2 Replies

3. Programming

My exe takes more time for specied input

My application is coded in C++ and uses pro C to get data from oracle database. My executable file is taking more time to execute for some specified input. Is there any way to check where it spends the maximum time? (1 Reply)
Discussion started by: SamRoj
1 Replies

4. UNIX for Dummies Questions & Answers

time how long it takes to load a module

Hello, like the title says, how can i measure the time it takes to load a module in Linux, and how how can i measure the time it takes to load a statically compiled module. /Best Regards Olle ---------- Post updated at 01:13 PM ---------- Previous update was at 11:54 AM ---------- For... (0 Replies)
Discussion started by: ollebanan
0 Replies

5. UNIX for Dummies Questions & Answers

What type of Disk I/O takes place on a FileServer?

When you open a file on a fileserver from your client, what type of operation takes place on the server? I imagine the server's hard drive reads the file that the client has requested, and then makes it available somehow through the network share, is that accurate? Also what service on Unix/Linux... (0 Replies)
Discussion started by: glev2005
0 Replies

6. Shell Programming and Scripting

sort takes a long time

Dear experts I have a 200MG text file in this format: text \tab number I try to sort using options -fd and it takes very long! is that normal or I can speed it up in some ways? I dont want to split the file since this one is already splitted. I use this command: sort -fd file >... (12 Replies)
Discussion started by: voolek
12 Replies

7. Red Hat

Login to server takes time

When I am trying to login to a server using Putty ssh from my windows xp machine it is taking too much time for login. My server name is http2 and when I enter this address into putty I immediately get login as: screen, but after I put my username root and enter the cursor moves downwards... (14 Replies)
Discussion started by: abhilashkrishn
14 Replies

8. AIX

Telnet or rsh takes too much time

telnet or rsh or ftp to an AIX machine takes too much time, like have to wait 3 minutes before the prompt appears. What can I look to troubleshoot this problem thanks (4 Replies)
Discussion started by: filosophizer
4 Replies

9. Shell Programming and Scripting

Wget takes a long time to complete

Hi, I wish to check the return value for wget $url. However, some urls are designed to take 45 minutes or more to return. All i need to check if the URL can be reached or not using wget. How can i get wget to return the value in a few seconds ? (8 Replies)
Discussion started by: mohtashims
8 Replies

10. Shell Programming and Scripting

Transfer file from a server takes long time

It takes 6 hrs for a 90 GB zip file that i am copying / transferring from serverA onto serverB. scp user1@serverA:/opt/setup/cash.zip . Output: cash.zip 21% 19GB 4.7MB/s 4:11:46 ETA uname -a SunOS serverB 5.11 11.2 sun4v sparc sun4vCan you please suggest if i could do... (11 Replies)
Discussion started by: mohtashims
11 Replies
SRAW(8) 						      System Manager's Manual							   SRAW(8)

NAME
sraw - benchmark raw scsi I/O performance under linux SYNOPSIS
sraw [ -fiv6 ] scsi-device [ bstart [ bstep ] ] DESCRIPTION
This program basically reads the specified scsi device and measures the throughput. Note that the filesystem *AND* the buffer cache are bypassed by this code, this program was designed to benchmark the naked scsi drivers by themselves without the need to account for the overhead of any other portion of the kernel. It also could be used to benchmark disk read throughput. This program does a series of reads of the disk, of consecutive areas on the disk. The device is first queried to determine the sector size for the device, and then the series of reads is begun. About 5.0 Mb is read from the device, and then the performance numbers are reported. Note that since the buffer cache is completely bypassed, there is no need to be concerned about cache hits or anything. Output of sraw is a set of lines, 4 numbers per line: blocksize, elapsed time, nblocks and throughput (in bytes per second). scsi-device is either a block device (e.g. /dev/sda, /dev/scd0) or a generic SCSI device (e.g. /dev/sg0). OPTIONS
-f set FUA (Force Unit Access) bit during read. Data is then read from media instead of internal drive cache. -i use legacy ioctl instead of new SG I/O layer (will not work on 2.6 kernel and block devices). -v more verbose output. -6 use 6-bytes instead of 10-bytes read command. In this case, only the first GB of data could be read from media. bstart starting block to check different zones on ZBR discs bstep factor for sequential stepping, default 1. Use 0 for reading always the same blocks (from cache) ERRORS
sraw could issue input/output errors when reading too many blocks at the same time from a block device like /dev/sda. To get rid of them, use /dev/sgN instead. AUTHOR
sraw was first written by Eric Youngdale. Extensions (-v, -f, -6, SG IO, man page) were written by Eric Delaunay. SEE ALSO
sg_dd(8) from sg3-utils package. AVAILABILITY
sraw is available at ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/ Nov 1993 SRAW(8)
All times are GMT -4. The time now is 03:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy