Re: disk or RAM



Roedy Green wrote:
Early in my career I learned the throwing more RAM at a problem
sometimes hurt. Back then when a computer was sold, the vendor had to
run a benchmark to prove the mettle of his machine, with the benchmark
provided by the customer. The vendor was allowed to tweak it to suit
that machine. These bencharks were less a matter of the mettle of the
machine as the teams of tweakers.

So what are some of the rules of thumb. When should you put something
in RAM and when on disk? How big should you make buffers?

I recall with fondness skunking IBM by a factor of seven on a
benchmark when their computer cost twice as much. They asked for
another turn. To their great embarrassment, the new results were
worse! They did not understand these principles.

This is primarily a question for students, but old timers are welcome
to toss in their nuggets of wisdom.


Well, an "old timer" might tell you the buffer in RAM is simply a multiple of the record blocking of the data file which is largely determined by the track/sector mapping of the particular disk. If the file was read sequentially it was necessary to provide enough buffering that the disk read could stay a block or two ahead of the sequential read through the buffer in RAM - most times 3-4 blocks worth of buffering was enough for each file being processed sequantially. If random access was used, a single block's worth of buffering was usually enough for the data file - multiple buffers were desirable for the index file so all of it could reside in RAM. Since all this was continually being paged in & out of RAM as 30-40+ other programs were running with varying levels of compute priorities, tuning the system was a near impossibility without performance monitoring.

Regarding large tables or arrays in memory - I almost always opted for disk I/O unless I was programming closer to the metal, which I rarely bothered to do.


Benchmark? Good luck! My only benchmark was running the same 30-40+
processes in one system with a stopwatch, then in the proposed system.
Simply running a benchmark on a single job yielded worthless info.

I will say I never had the budgetary luxury of throwing too much RAM at
a problem. Every increment I did manage to add was always money well spent.

Well, that's what one "old timer" *might* say - not exactly a nugget of
wisdom would you say?



.



Relevant Pages

  • Re: experimantal question about mds
    ... Clearly the Writeprocess of writeing data to an mirror is totally ended, ... Gigs of ram for buffering ... the directory abc on the disk directaccesABC ??? ... buffering on this rambased Diskdevice.... ...
    (freebsd-hackers)
  • Re: Abysmal disk performance, how to debug?
    ... The dd returns as soon as all data could be buffered in RAM. ... will show how long it takes to actually write out the data to disk. ... I suspect it has two RAM areas, ... RAM to finish the dd command by buffering the remaining data. ...
    (Linux-Kernel)
  • Re: running Linux with no swap space (but lots of RAM)
    ... The buffering logic ... | into memory. ... Reading is does not create the same situation as writing out. ... By that time a huge amount of RAM is ...
    (comp.os.linux.development.system)
  • Re: MALLOC
    ... This also makes it nearly impossible to use 1GB of RAM, because that 1GB has to be ... buffering using only 128K buffers, (64K each channel, CD-audio quality, 44.1K samples per ... >the pci card has a plx chip which provides dma facilty for data transfer. ... >i have input audio files i need to read the data from the files and store the audio data in an buffer. ...
    (microsoft.public.vc.mfc)
  • Re: Itanium Madison blasts Sun, IBM in encryption specs!
    ... Public assertions of SPEC unpublished benchmark performance figures ... RAM on the V210 is 1/2 that of the V240: ... Now that does not include a credit for the 2GB of RAM that needs to be ... The cost for ZWS is $1700 for an up to two CPU system. ...
    (comp.os.vms)