If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
What is: block-level and file-level
Hi all,
Can anyone provide or point me to a technical explanation of these terms? I've read a bunch of papers that use these terms, but they don't explain them. Thanks! |
#2
|
|||
|
|||
|
#3
|
|||
|
|||
|
#4
|
|||
|
|||
Major Blunts wrote:
Hi all, Can anyone provide or point me to a technical explanation of these terms? I've read a bunch of papers that use these terms, but they don't explain them. Thanks! It's pretty simple really. Block level I/O sees the disk as a sequential sequence from blocks with no additional structure, i.e. you ask to read or write a sequence of block addresses. File level I/O sees the disk as a structured device with directories and files, so your application opens a directory or a file and performs I/O within the constraints of the way the filesystem data is layed out on the disk. Of course a request to read "file x" ultimately becomes a block level request to read certain disk blocks on the drive, but the translation of the file I/O request into corresponding block I/O requests is handled inside the operating system. -- Nik Simpson |
#5
|
|||
|
|||
"Major Blunts" wrote in message om... (Major Blunts) wrote in message . com... Hi all, Can anyone provide or point me to a technical explanation of these terms? I've read a bunch of papers that use these terms, but they don't explain them. Thanks! Just to be clear, I'm asking in relation to SAN and NAS devices. Anything specific to database environments would be great. A block-level interface (between a 'host' system and storage) views the storage as a linear range of equal-sized 'disk blocks': the host asks the storage to read or write one or more consecutive blocks per request. Traditional storage maps these blocks linearly to the actual disk blocks (or perhaps 'stripes' them across multiple disks with a simple algorithm); 'virtualized' storage may map the storage blocks seen by the host arbitrarily to disk locations, even across multiple storage boxes. A file-level interface (between a 'client' system and a 'file server') views the storage as a group of files, organized into the traditional hierarchical structure by directories. Aside from maintenance operations (open, close, list directory, etc.), the client asks the server to read or write a consecutive range of bytes within a particular file in each request, and the server maps this request to its storage much like a client system maps local requests to its local storage. With a block-level interface, you need to use a 'SAN file system' (or a similarly-integrated database mechanism such as Oracle Parallel Server) on the hosts if multiple hosts want to share the same files on the storage, because the host/storage interface is too low-level to be aware of the file-level coordination required and the hosts must thus communicate among themselves to provide it (if no portion of the storage is shared among multiple hosts, they all can just treat their portion like a local disk, with no inter-host coordination required). With a file-level interface, that coordination can take place on the server (very much like access coordination on a stand-alone system between applications that access a single file concurrently occurs); however, that precludes caching any data locally on the clients, so high-performance NAS implementations extend the interface to allow this and thus make it more complex, some even requiring similar inter-host coordination to that required to share files on a block-level SAN - and sophisticated NAS approaches can even map files across multiple NAS servers. Thus a simple SAN maps what appear to the host to be 'disk blocks' quite directly to actual disk blocks at the storage, with little loss of bandwidth or increase in latency over comparable local storage. A simple NAS just exports client requests to a server where the requested file-level operation is performed, incurring somewhat greater latency than would occur accessing local storage (and possibly compromising bandwidth as well). But a simple NAS allows easy file-sharing among multiple hosts, while a simple SAN does not. - bill |
#6
|
|||
|
|||
"Nik Simpson" wrote in message
File level I/O sees the disk as a structured device with directories and files, so your application opens a directory or a file and performs I/O within the constraints of the way the filesystem data is layed out on the disk. Isn't that how most applications work? I thought that applications don't know if the file they are accessing is on SCSI (block) storage or NAS (NFS, SMB, etc.) storage? Of course a request to read "file x" ultimately becomes a block level request to read certain disk blocks on the drive, but the translation of the file I/O request into corresponding block I/O requests is handled inside the operating system. Using NFS as an example, what do you mean by: the translation of the file I/O request into corresponding block I/O requests is handled inside the operating system. Thanks! |
#7
|
|||
|
|||
Major Blunts wrote:
"Nik Simpson" wrote in message File level I/O sees the disk as a structured device with directories and files, so your application opens a directory or a file and performs I/O within the constraints of the way the filesystem data is layed out on the disk. Isn't that how most applications work? I thought that applications don't know if the file they are accessing is on SCSI (block) storage or NAS (NFS, SMB, etc.) storage? Correct, *most* applications work via the filesystem. In the past, (and perhaps still today) some applications, notably databases worked at the block level for performance reasons. Of course a request to read "file x" ultimately becomes a block level request to read certain disk blocks on the drive, but the translation of the file I/O request into corresponding block I/O requests is handled inside the operating system. Using NFS as an example, what do you mean by: the translation of the file I/O request into corresponding block I/O requests is handled inside the operating system. Application X running on the NFS client opens a file reads 20bytes from a file called "foo" on the NFS mounted directory. The NFS client software turns this into NFS protocl requests to the NFS server. The requests (viewed somewhat simply) would be: 1. Open file "foo" and give me back an open file descriptor for future use 2. Return the first 20bytes of the file referenced by the aforementioned open file descriptor On the NFS The Open file request means going through the file system to find the file "foo" and its associated directory entry. The directory entry in the filesystem contains a list of physical disk blocks that contain file "foo" this enables the OS to find the correct block addresses needed to access the contents of file "foo" The request for the first twenty bytes of the file is satisfied by find the block address (from the directory entry) of the first disk block used by the file and then performing block level I/O to read that block into memory. Once the block is in memory the the requested bytes are packaged up and sent back to the NFS client which passes them on to the application. So, in actuality, *ALL* disk I/O is block I/O at some point, you just don't have to deal with keeping track of which blocks are used each file because the OS and the filesystem hide that complexity from you by overlaying the abstract concept of a filesystem on top of the block device we call a disk. -- Nik Simpson |
#8
|
|||
|
|||
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mustek 1200 III EP undetectable in any image program | Raymond A. Chamberlin | Scanners | 18 | January 10th 05 08:52 AM |
Could not perform fixation? | Princess Morgiah | Cdr | 8 | June 27th 04 02:30 AM |
Nero and dvd-r failure | Blair Wilson | Cdr | 1 | February 5th 04 07:23 AM |
Can't get CD Burner to Burn | Nottoman | General | 2 | December 22nd 03 05:47 PM |
parhelia w/ 3 monitors | tony wong | Matrox Videocards | 16 | September 12th 03 03:59 AM |