🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.hardware
Article #2258

optimal buffer size for writing to harddisks ?

#2258
From: Skybuck Flying
Date: Sat, 21 Sep 2002 13:36
23 lines
1878 bytes
Hi...

Do you happen to know what would be the optimal buffer size for writing to
harddisks ?

It probably differs from disk to disk... probably even os to os... but I am
talking windows here.

For example a buffer of 1 byte would be very slow. Writing and reading to
harddisks/files byte by byte is very slow... probably a mixture of seektime
but probably not because of cache... the reason it's slow is probably api
calling etc...

Also a buffer of 10 or 100 megabyte seems to slow also... it's just too
big...

So what would be the optimal buffer size for TfileStream.Write... ?

I once used a 4 kb buffer which worked ok...

Is there any theory on this ? :)

Skybuck.
Technical Details
Message-ID: <Dq_i9.8661$48.937545@zwoll1.home.nl>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!newsswitch.lcs.mit.edu!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news-x2.support.nl!newshub1.nl.home.com!news.nl.home.com!zwoll1.home.nl.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5f89,52893404a1ab9f43,start
X-Google-Attributes: gidf5f89,public
X-Google-Thread: 1043cf,52893404a1ab9f43,start
X-Google-Attributes: gid1043cf,public
X-Google-ArrivalTime: 2002-09-21 06:38:03 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!newsswitch.lcs.mit.edu!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news-x2.support.nl!newshub1.nl.home.com!news.nl.home.com!zwoll1.home.nl.POSTED!not-for-mail
From: "Skybuck Flying" <nospam@hotmail.com>
Newsgroups: alt.comp.hardware,borland.public.delphi.objectpascal
Subject: optimal buffer size for writing to harddisks ?
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <Dq_i9.8661$48.937545@zwoll1.home.nl>
Date: Sat, 21 Sep 2002 15:36:11 +0200
NNTP-Posting-Host: 217.121.93.57
X-Complaints-To: abuse@home.nl
X-Trace: zwoll1.home.nl 1032614691 217.121.93.57 (Sat, 21 Sep 2002 15:24:51 MEST)
NNTP-Posting-Date: Sat, 21 Sep 2002 15:24:51 MEST
Organization: @Home Network