I'm caught in a loop of overthinking things I don't know in enough depth...
Under Solaris, are the filesystem drivers smart enough to control EWOULDBLOCK based on nfs read-ahead's? I'm trying to decide if it'd be worth going to the trouble of implementing nonblocking io into the file reads of our httpd (whose docuement tree is all nfs-mounted)... Given the inherent latencies in NFS vs. local disk, I'm hoping that I could only issue reads to filehandles that already have read-ahead data. There's definately alot of other stuff that has to be worked and thought out as well, but I thought I figured I first see if the basic functionality was there before digging into it harder..
thanks. ..kg..
[snip]
worth going to the trouble of implementing nonblocking io into the file reads of our httpd (whose docuement tree is all nfs-mounted)... Given the inherent latencies in NFS vs. local disk, I'm hoping that I could only issue reads to filehandles that already have read-ahead data.
[snip]
Interesting question, and one worth investigating. I'll just offer that it was actually filers that helped dispel the notion that there are "inherent latencies in NFS vs. local disk". Watch what iostat shows you during periods of heavy I/O and you might be surprised - NetApps often have _lower_ latency than local disk, at least if iostat's "svc_t" is to be believed. :-) I've been curious to know if the I/O path through the NFS/network code is actually more highly tuned than UFS/SCSI (or FCAL) drivers, or if it really just all comes out a wash...
Years ago on an old Sun 4/670MP with a pair of VME SunNet Coprocessors (an old NFS accelerator board) and a 1MB Sbus Prestoserve we ran some benchmarks and tests to prove to a group of software engineers that having local disks in their machines was _not_ necessarily faster than running diskless; we had 30 ELC's on two shared 10base2 subnets running various diskless, dataless, and diskfull configurations and ran various tests with the development tools they used - heavy compilation, make, rcs, etc. In most cases, the fully-diskless results were *faster* than running with local disk, even when machines were configured to swap over the net rather than to local disk.
Of course, things have changed tremendously since 1992 :-) but the experience showed me that the network can often be as fast or faster than local resources... so when filers appeared on the scene a few years after that I was pretty much already in the NAS camp, even before the acronym had been coined. :-)
Speaking of which, back to my Oracle tests...
-- Chris
-- Chris Lamb, Unix Guy MeasureCast, Inc. 503-241-1469 x247 skeezics@measurecast.com
Under Solaris, are the filesystem drivers smart enough to control EWOULDBLOCK based on nfs read-ahead's?
Under Solaris, do the filesystem drivers even *return* EWOULDBLOCK/EAGAIN?
It's been ages since I've seen SunOS 5.x or even SunOS 4.x kernel code, but, as I remember, EWOULDBLOCK and EAGAIN were used only on "slow" devices, e.g. serial ports and pseudo-terminals, network connections, pipes, other sockets/STREAMS devices, and perhaps some specialized devices; it wasn't used on files.
I.e., it was used only for devices where the availability of input, and the availability of buffer space for output, was not completely under the control of the machine running the program - it depended on another machine on the network, or on a user.
EWOULDBLOCK antedated NFS, and heavy use of networked file systems; at that time, file data's availability was under the control of the machine reading or writing the file (it was dependent on the disks on which the data resided, but that's part of the machine).
With NFS or CIFS or other networked file systems, you could argue that even the availability of input from ordinary files is now under the control of machines other than the machine reading the file; for better or worse, however, non-blocking I/O and "select()"/"poll()" tend not, as far as I know, to be implemented by file system driver, so that "select()" and "poll()" assume that input is always available and output is always possible, and non-blocking I/O isn't different from blocking I/O.
I'm trying to decide if it'd be worth going to the trouble of implementing nonblocking io into the file reads of our httpd (whose docuement tree is all nfs-mounted)... Given the inherent latencies in NFS vs. local disk, I'm hoping that I could only issue reads to filehandles that already have read-ahead data.
I suspect that won't help. You might want to experiment with it - by, for example, writing a program that opens a file in non-blocking mode and, when you type a line to it, attempts to read from the file and reports whether it got -1 and EWOULDBLOCK/EAGAIN, and:
run the program, having it read from a file on some file server;
once it's waiting for you to type a line to it, temporarily unplug that file server from the network, type a line to the program, and see whether it hangs waiting for the read to finish (with the machine giving "NFS server XXX not responding") or gets -1 and EWOULDBLOCK/EAGAIN;
plug the file server back into the network when you're done.
If that fails, you'll have to try something else. I suspect, for example, that the asynchronous I/O operations - "aio_read()" and "aio_write()" - work on ordinary files, in which case you could use them to start a read on the file without blocking waiting for it to finish; you could later wait for the read, or arrange to have SIGIO, for example, delivered when the read completes.
That doesn't let you avoid doing the read altogether if the data isn't already available, but at least it keeps your program from blocking waiting for the read to finish.
Of course, it may be that the NFS latencies aren't worth worrying about - or aren't as bad as the latencies on your local disk - as Chris Lamb noted, so I'd be inclined to see whether there *is* a latency problem before trying to solve the problem.
Checking the 6.1.1 configuration guide, they show slots 6 and 1, in that order, for adding a SCSI for tape card. Slot 6 has a FCAL board in it, so I popped the SCSI card into slot 1 -- but on reboot, the system grumbled
sysconfig: SCSI Adapter card (PN X201X) in slot 1 must be in one of these slots: 6,2.
So, like, what's up with that?
The hardware rollcall did list
slot 1: SCSI Host Adapter 1 (Qlogic ISP 1040B) Fast/Wide, Single-ended Firmware Version 4.65 Clock Rate 60MHz. 5: Tape: Quantum DLT7000 2150 I/O base 0xad00, size 0x100 memory mapped I/O base 0x9beff000, size 0x1000
which looks copasetic, but it is safe to go ahead and use it?
I would think that you've run into some sort of configuration issue. I've seen errors before when running a sysconfig -c (you may want to try this) where the filer runs fine but it's been optimized to run another way. In other words it may work fine the way that you have it but it might work better another way. If you can get the down time you may want to put the FCAL card into another slot and put the scsi card into slot six where it wants it.
Have you checked the configuration guide that netapp has online? If not check this out...
http://now.netapp.com/NOW/knowledge/docs/hardware/syscfg/index.shtml
Hope this helps.
Kelly McQuarrie Unix System Administrator Ericsson CDMA Systems
On Fri, 24 Aug 2001, Jim Davis wrote:
Checking the 6.1.1 configuration guide, they show slots 6 and 1, in that order, for adding a SCSI for tape card. Slot 6 has a FCAL board in it, so I popped the SCSI card into slot 1 -- but on reboot, the system grumbled
sysconfig: SCSI Adapter card (PN X201X) in slot 1 must be in one of these slots: 6,2.
So, like, what's up with that?
The hardware rollcall did list
slot 1: SCSI Host Adapter 1 (Qlogic ISP 1040B) Fast/Wide, Single-ended Firmware Version 4.65 Clock Rate 60MHz. 5: Tape: Quantum DLT7000 2150 I/O base 0xad00, size 0x100 memory mapped I/O base 0x9beff000, size 0x1000
which looks copasetic, but it is safe to go ahead and use it?