From: alan@nabeth.cxo.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
Subject: Re: reading and writing large files (c. 18Mb)
Date: Thu, 9 Dec 1993 04:43:22 GMT [thread overview]
Message-ID: <1993Dec9.044322.29863@nntpd2.cxo.dec.com> (raw)
In-Reply-To: CHoysq.7v9@unix.portal.com
In article <CHoysq.7v9@unix.portal.com>, 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
prev parent reply other threads:[~1993-12-09 4:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-12-08 1:00 reading and writing large files (c. 18Mb) Stephen Reagan
1993-12-08 18:04 ` Burkhard Neidecker-Lutz
1993-12-09 4:43 ` Alan Rollow - Alan's Home for Wayward Tumbleweeds. [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox