From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,4c96a972b239d053 X-Google-Attributes: gidf8c9b,public X-Google-Thread: fc89c,4c96a972b239d053 X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,4c96a972b239d053 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-12-09 20:17:37 PST Xref: gmd.de comp.unix.questions:25596 comp.unix.osf.osf1:1681 comp.unix.programmer:10778 Newsgroups: comp.unix.questions,comp.unix.osf.osf1,comp.unix.programmer Path: gmd.de!xlink.net!sol.ctr.columbia.edu!news.kei.com!uuspew.uu.net!uunet!decwrl!pa.dec.com!nntpd.lkg.dec.com!nntpd2.cxo.dec.com!nabeth.cxo.dec.com!alan From: alan@nabeth.cxo.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.) Subject: Re: reading and writing large files (c. 18Mb) Message-ID: <1993Dec9.044322.29863@nntpd2.cxo.dec.com> Sender: usenet@nntpd2.cxo.dec.com (USENET News System) Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.) Organization: Digital Equipment Corporation References: Date: Thu, 9 Dec 1993 04:43:22 GMT In article , sdr@shell.portal.com (Stephen Reagan) writes: > >I have been given a project which involves reading approx. 18Mb of information >from one file and then appending this information to another file; the program >is to run every 30 minutes and at the beginning of each day a new file is to >be created. My questions are this: > > 1). What impact will this have performance-wise? We are running > real-time applications on DEC Alpha OSF 1.3; my concern is that > this kind of stuff will bring the system to its knees. 18 MB will fit in the buffer of most OSF systems. In fact the Unified Buffer Cache code will work hard to see that it does fit. This semi- feature may cause the biggest performance problem, since it will have the buffer cache paging against running programs that also want the memory. If you have the free memory, it shouldn't hurt much. 18 MB by the way isn't very much. A good fast disk can write that in about 9 seconds and a decent stripe set can do it in two or three. > > 2). Assuming that the system can handle this kind of onslaught, > is there a recommended way of processing this kind of data Try to append to the other file as soon after writing the first one as possible. That way, you increase the chance that the data is still in the buffer cache and you don't have to read it. The 2nd write will likely cause some cache thrashing as you're now trying to use 36 MB of buffer cache. When writing the data either time, try to use large I/Os. 64 KB or larger. If the first program wants to do small writes, fix it. The appending step can certainly use large reads and writes. > 3). Does it make any sense to keep this information in a separate > file system, in terms of performance? If possible, it might be wise to have the two files on different devices (not different file systems on the same device). That way you don't have the single device seeking against itself. Avoid disks that are already busy. If you have multiple controllers see if doing the append between controllers is faster than having the devices on the same controller. > How about on another node, > accessible via TCP/IP? My guess is there ought to be some kind > of "server" responsible for actually accessing this file and > sending data to or receiving it from some other process/source. Disks are faster than Ethernet these days. Some disks are faster than FDDI. Try to keep the data off slower data paths. If the initial file is created from a client to NFS server, look at Prestoserve. It may help some. For appending the file prefer to have them on the same system and use it for the appending work. > >Thanks! > >--Steve > -- Alan Rollow alan@nabeth.cxo.dec.com