aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Increase File Buffer Size  (Read 7283 times)

gnazio

  • Approved Newbie
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 18
  • Live long and prosper
Increase File Buffer Size
« on: April 09, 2012, 06:30:27 PM »

What about increasing the file buffer size limit?
The limit has been the same in about 10 years of development (considering emule too), and in the meanwhile PC's capacities (RAM/HD cache/...) are vastly improved.
Logged

stoatwblr

  • Sr. Member
  • ****
  • Karma: 12
  • Offline Offline
  • Posts: 318
Re: Increase File Buffer Size
« Reply #1 on: April 15, 2012, 03:02:23 PM »

I believe that's the amount held in ram before committing to disk.

Is tweaking that a good idea? Linux/BSD already has their own disk write buffering anyway.

Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Increase File Buffer Size
« Reply #2 on: April 15, 2012, 04:18:07 PM »

It's hard to tweak, since I'm sure you won't notice any different behavior anyway.
And if you start with it, you need options to not waste4 memory on the embedded platforms and all that. I don't think it's worth the effort.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

darkbasic

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 47
Re: Increase File Buffer Size
« Reply #3 on: May 23, 2012, 01:51:31 PM »

It helps preserving disk health, with modern connections you can fill a 1.5MB buffer in less than a second and ram isn't a problem anymore. You can keep the default and let power users customize it.
Logged
Sorry for my bad English...
Debian Sid amd64 | Fedora 8
AMD Athlon64 3800+ X2@2600Mhz vcore 1.392| My PC

darkbasic

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 47
Re: Increase File Buffer Size
« Reply #4 on: May 23, 2012, 06:58:45 PM »

As I said you can keep the actual value as default but let peoples increase the buffer.
Logged
Sorry for my bad English...
Debian Sid amd64 | Fedora 8
AMD Athlon64 3800+ X2@2600Mhz vcore 1.392| My PC

ErstStavroBlofeld

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
Re: Increase File Buffer Size
« Reply #5 on: February 05, 2022, 02:29:49 PM »

For anybody who wants to change it:

Got to the src folder and open the files and search for this lines.
Change the 15000 to 90000 and you have a max Buffer of 9MiB instead of 1.5MiB

PrefsUnifiedDlg.cpp:   
Code: [Select]
label = CFormat(wxPLURAL("File Buffer Size: %d byte", "File Buffer Size: %d bytes",
        event.GetPosition() * 15000)) % (event.GetPosition() * 15000);


Preferences.h:
Code: [Select]
static uint32 GetFileBufferSize() { return s_iFileBufferSize*15000; }
static void SetFileBufferSize(uint32 val) { s_iFileBufferSize = val/15000; }
[code]

This value should be outplaced as a constant.
Logged