Welcome, Guest. Please login or register.

Author Topic: a question about block and buffer sizes in HDToolBox with OS3.1.4  (Read 6813 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Gulliver

Also what determines the optimum buffer size?

I wrote this for the 3.2 FAQ, it also applies for you too.

4.8 * How can I speed up disk operations?

We already have a cache system built-in that it is severely
underused. That is the case of buffers that can be set within
HDToolBox in a non destructive manner, or by using the AddBuffers
command.

Nobody usually tweaks this values, and this is a huge performance
boost possibility that often gets overlooked.

Buffers are file system independent, so they should be safe to be used
under any AmigaOS compatible file system.

This is a rough guide that will attempt to provide you with advice on
how much memory should be destined for buffer usage, so take it with a
grain of salt. It really depends on your Amiga habits and your
hardware configuration. So don't be afraid to tweak these values and
experiment in order to achieve the best results.

For any drive, remember that each partition in your system will have
buffers by default assigned to it, so first check what amount they use.
And also consider that all those partitions, no matter which one is
bootable, will add their buffer usage to generate a grand total.

Yes, buffers are great, but they are certainly not for free, as they
consume ram.

Buffers only make sense when the data to be cached will be accessed
several times, and for that to happen they need to be preloaded with
something to start caching. So the idea is that the system will get
much faster from the second time onwards that it accesses the same
data.

The following is the total amount of buffer ram usage we recommended
(it should be divided between all your partitions). Note that all
values are approximate.

Total system ram  -  Recommended amount of ram to add to buffers
  2 MB            -  Don't add more buffers, you can barely run the OS!
  4 MB            -  128 KB (256 buffers)
  8 MB            -  256 KB (512 buffers)
 16 MB            -  512 KB (1024 buffers)
 32 MB            -  1 MB (2048 buffers)
 64 MB            -  2 MB (4096 buffers)
128 MB            -  4 MB (8192 buffers)
256 MB            -  8 MB (16384 buffers)

To apply a change to the system buffers just add the corresponding
buffer value to the volume/s you wish. The easiest method is by simply
modifying the startup-sequence in the AddBuffers line.   
 

Offline Gulliver

Re: a question about block and buffer sizes in HDToolBox with OS3.1.4
« Reply #1 on: December 09, 2019, 01:39:47 PM »
Am I right in remembering that these buffers are caching file system data blocks as opposed to actual file data blocks? So the effect of adding more is supposedly greater for volumes with many relatively small files, and/or many files in each directory, rather than with fewer, bigger files?

If so, maybe this aspect would be useful to mention in the otherwise very good FAQ entry.

Best regards,

Niels

You are absolutely correct on what you just posted.

I will integrate your comments to the answer in the FAQ.

Thank you!

Best regards,
Ignacio
 

Offline Gulliver

Re: a question about block and buffer sizes in HDToolBox with OS3.1.4
« Reply #2 on: December 09, 2019, 08:23:32 PM »
Unlike what Gulliver said, I wouldn't go with the number of buffers beyond a reasonable number, e.g. 256, unless you really have to (see above, for hardfiles). More buffers are not necessarily faster, because it also means that the FFS needs to search in a larger set to find the right block, and this takes longer if there are more blocks.

Well, it is a matter of usage, that is why I mention to test and
experiment with those values.

I will give you an example of the configuration of a high-end Amiga
user that I visited the other week. His system is an Amiga 3000
equipped with a 68060, 256 MB of fast memory and a Mediator with
network, gfx, sound and usb pci cards.

He mostly uses it to do some 3d rendering stuff, play mpg videos
and 3d gaming (we played Quake).

We did experiment with buffer settings and he got a great performance
increase on his usual activities by allocating a total of about 4000
buffers (counting all partitions and devices present). Beyond that,
improvements were not really noticeable and seemed a waste of memory.
So he settled with that.

A question: What is the algorythm used to discard cached data when buffers are full? LRU? are they just FIFO buffers? or do they follow other algorithm?
 

Offline Gulliver

Re: a question about block and buffer sizes in HDToolBox with OS3.1.4
« Reply #3 on: December 10, 2019, 03:00:54 PM »
Thank you very much both Thomas and Olaf.

I overestimated the use of buffers and now clearly understand that their
use as a sort of cache is incidental not an intended goal. And they are
not really efficient at that either.

A more conservative approach on their usage sounds as better advice.
 
The following users thanked this post: klx300r