[OpenAFS-devel] Patch to implement default tuning proposal discussed a while ago

Niklas Edmundsson Niklas.Edmundsson@hpc2n.umu.se
Fri, 12 Aug 2005 13:26:00 +0200 (MEST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-824023566-1123845960=:27675
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed


Hi all!

This patch tries to implement the afsd default tuning parameters 
discussed in the thread starting at 
https://www.openafs.org/pipermail/openafs-devel/2005-May/012158.html

I took the liberty of adding chunksize-tuning to the memcache too, 
with the motivation that people using large memcaches usually wants 
better bulk performance too.

It seems to work for me using both disk cache and memcache of various 
sizes.

Comments are welcome.


/Nikke - with greetings from Hackathon 3
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se     |    nikke@hpc2n.umu.se
---------------------------------------------------------------------------
  If there was a wait for Q to show up, would there be a Q queue?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
---559023410-824023566-1123845960=:27675
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=openafs-afsd-defaulttuning.patch
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.4.62.0508121326000.27675@khan.acc.umu.se>
Content-Description: 
Content-Disposition: attachment; filename=openafs-afsd-defaulttuning.patch

SW5kZXg6IHNyYy9hZnMvYWZzX2NodW5rLmMNCj09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT0NClJDUyBmaWxlOiAvY3ZzL29wZW5hZnMvc3JjL2Fmcy9hZnNfY2h1
bmsuYyx2DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNg0KZGlmZiAtdSAtcjEu
NiBhZnNfY2h1bmsuYw0KLS0t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