Re: Linux vs. Solaris file IO performance
On Mon, Oct 28, 2002 at 01:55:40PM -0500, Michael O'Donnell [EMAIL PROTECTED] wrote: mount my filesystems with async option. Good point. Does the Solaris box have async or a similar feature set? I haven't played with async on and off, but it seems like it could create the behavior you are describing. -- Bob Bell [EMAIL PROTECTED] - If you think you are experiencing a memory leak, please be aware that memory leaks may not be what they appear to be. You may discover that a memory leak is really not a memory leak but a performance enhancement. -- Microsoft Knowledge Base Article Q268343 (out of context :-) ) ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Linux vs. Solaris file IO performance
In a message dated: Mon, 28 Oct 2002 16:15:52 EST Mark Komarinski said: Actually, FC drives are being produced in such large quantities now that they're cheaper than SCSI drives in many cases. It's the controllers that'll really set you back! SCSI controllers are cheap! Really?? Sun charges $2300 for a 36GB FC drive. Yeah, Sun charges too much for everything. Ever looked at what they get for memory? Unless FC-AL is different from FC. Technically speaking, there is a difference, but it doesn't really affect the price that much. FC-AL is Arbitrated Loop, which is just a means of coordinating which drive on the bus can speak when. Remember, FC is a serial protocol, so it's similar in concept to things like Token Ring and FDDI. You can have non-AL FC set ups. Which may be why their stock is in the toilet... No, I think their stock is where it is for the same reason everyone elses is there. The market sucks. That, and people are replacing Sun systems with cheap Linux boxes :) -- Seeya, Paul -- It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Linux and sendfile
Hi all, I'm hoping there are some fellow programmers here that have used the sendfile system call. What I'm wondering is should I treat sendfile like write when the out_fd is a socket. By that, I mean even if I specifiy N count bytes, sendfile might only send N bytes and if it does, I should call sendfile again. Here's the prototype: ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count); ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Linux and sendfile
The usual semantics is when it returns count, then you're done, assuming you're trying to copy everything from in_fd to out_fd. It wouldn't hurt to keep calling it, you just need to make sure that you don't end up in an infinite loop. Jeff Macdonald wrote: Hi all, I'm hoping there are some fellow programmers here that have used the sendfile system call. What I'm wondering is should I treat sendfile like write when the out_fd is a socket. By that, I mean even if I specifiy N count bytes, sendfile might only send N bytes and if it does, I should call sendfile again. Here's the prototype: ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count); ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Linux and sendfile
-- GnuPG Key ID: B280F24E ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
RE: LILO
-Original Message- From: Stephen Ryan [mailto:sryan;gargantubrain.dartmouth.edu] Sent: Friday, October 25, 2002 10:46 AM To: [EMAIL PROTECTED] Subject: Re: LILO On Fri, 2002-10-25 at 10:25, Price, Erik wrote: Hi, On my work computer (which currently has one drive for Win2k and another drive for Debian3.0), I had at one time installed SuSE Linux. I later wrote Debian3.0 over the SuSE Linux install, but forgot that I had installed LILO from SuSE. I boot into Debian by using a boot disk. When the computer boots up, if I don't have the Debian boot disk in the floppy drive, the SuSE LILO choice comes up, and if I forget to choose Windows, it tries to boot the SuSE distro. I guess the Debian install never overwrote the vmlinuz file pointed to by the SuSE LILO. (It is definitely booting the SuSE distro b/c the Debian boot output is very different from the SuSE boot output and when the prompt comes up, it's the old name for the computer when I had SuSE on it, not the new one that I gave the machine when I installed Debian). So my question is this -- if I use apt-get to install LILO from Debian, will it overwrite the LILO that's already there from SuSE? Safely? I'd like to kill a few birds with one stone -- 1) No longer use a boot disk to boot into Debian 2) Set the system to boot Windows by default 3) Get rid of the SuSE LILO screen and the inadvertent boot into the SuSE distro I would assume that I could do this by installing LILO from Debian. Ideally it will overwrite the LILO that was installed by SuSE, and then I can run the LILO commands to change the defaults. But I thought I'd run it by the list first, so I don't screw anything up. Sounds good to me. You'll just have to put a default line in the block for Windows, and boot=/dev/hda at the top to make sure that this lilo overwrites anything previously installed. Well, the only problem is that it appears that LILO *is* installed by default by my Debian installation, only it's not active or whatever the term is, since the SuSE LILO screen still comes up. Because this involves writing to MBR and /dev/sda, I'm really hesitant to do anything that could jeopardize the Windows disk (sda has windows, sdb has Debian) -- paranoid, actually. Having never configured a LILO.conf file before, I was wondering if someone could post a copy of theirs (ideally one similar to my own setup, with Windows on one disk and Linux on another). TIA, Erik ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Linux and sendfile
Jeff Macdonald [EMAIL PROTECTED] writes: I'm hoping there are some fellow programmers here that have used the sendfile system call. What I'm wondering is should I treat sendfile like write when the out_fd is a socket. By that, I mean even if I specifiy N count bytes, sendfile might only send N bytes and if it does, I should call sendfile again. Here's the prototype: ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count); What type of fd's are these? Regular files? TCP sockets? UDP sockets? Something else? Are these fd's in blocking or non-blocking mode? What kernel are you running? Going under the assumption that these are TCP sockets running under a relatively recent kernel, *yes*, you definitely want to deal with the situation in which sendfile() returns something less than count. Regards, --kevin -- Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA) cetaceannetworks.com!kclark (GnuPG ID: B280F24E) alumni.unh.edu!kdc ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Linux and sendfile
[PLEASE DON'T TOPQUOTE] Jeff Macdonald [EMAIL PROTECTED] writes: Hmmm I'm thinking I'm braindead. read may not return the number of bytes requested, True. write should always return the number of bytes written, and that should be the number requested or it is an error. False. Regards, --kevin -- Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA) cetaceannetworks.com!kclark (GnuPG ID: B280F24E) alumni.unh.edu!kdc ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Linux and sendfile
[PLEASE DON'T TOPQUOTE] Jeff Macdonald [EMAIL PROTECTED] writes: out_fd is a socket in_fd is a file recent kernels. And you've guessed it, I want to use non-blocking mode on the sockets (tcp). basically I'm using sendfile to send the data portion of a SMTP session. Since that may take a while, I'd like to do it in non-blocking mode. I just read stevens APUE about O_NONBLOCK and for write I could get fewer bytes then requested (page 365). So can I expect the same behavior from sendfile? I wouldn't depend on sendfile() returning -1 and setting errno to EWOULDBLOCK (it doesn't seem to) when out_fd is in non-blocking mode, but still, you can proceed if your code pays attention to the number of bytes written. Your code should select()/poll()/whatever on out_fd() and when there is room to write, you should call sendfile() with the appropiate arguments. (does sendfile() block on in_fd? I don't think so. It seems to read the data if it is already in cache, but doesn't hang around and block waiting for the page to arrive if it's not already there) Regards, --kevin -- Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA) cetaceannetworks.com!kclark (GnuPG ID: B280F24E) alumni.unh.edu!kdc ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss