aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: FileBufferSize  (Read 6904 times)

moron

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 21
FileBufferSize
« on: October 09, 2007, 06:07:58 PM »

Hey,

i would like to increase the file buffer size to something like 20MBs.

How do i have to change the "FileBufferSizePref" value in the "amule.conf"?
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: FileBufferSize
« Reply #1 on: October 09, 2007, 08:25:27 PM »

Hi moron,

the value is (afaik) in bytes, therefore set it to 20*1024*1024.

kind regards
Logged

moron

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 21
Re: FileBufferSize
« Reply #2 on: October 10, 2007, 08:02:21 AM »

hmm i don't know if it is that simple...

Currently amule shows my a file buffer size of 1,5MB (1500000 bytes) in the prefs-window.

The value for "FileBufferSizePref" in the amule.conf file is "100" at the same time.

that's why i was assuming, that this value represents the buffer size somehow in percent or something...

It is not appearing to be an absolute value.
« Last Edit: October 10, 2007, 08:04:02 AM by moron »
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: FileBufferSize
« Reply #3 on: October 10, 2007, 09:23:35 AM »

I don't know, I only had a look at the code and in PartFile.cpp and you see the buffer size check in line 1435 (current developmental version)
Code: [Select]
if ( (m_nTotalBufferData > thePrefs::GetFileBufferSize()) ||And m_nTotalBufferData seems to be in Bytes. I have'nt found any manipulations in the preferences code either.
Logged

moron

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 21
Re: FileBufferSize
« Reply #4 on: October 12, 2007, 12:48:37 PM »

I'm using amule 2.1.3.
The value in amule.conf is in percent indeed.
Setting any value above 100 will reset the settings for the file buffer size.
So i assume there is no way to get a larger buffer size?

I'm asking because i don't want to stress my harddisk with buffering only 1.5MB.

Is there maybe another possibility to affect data writing to disk?

I'm using ubuntu gutsy with ext3 file system.

Is it possible to make the file system cache more data (in general / coming from amule) before actually writing it to disk?

thanks
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: FileBufferSize
« Reply #5 on: November 07, 2009, 10:10:50 PM »

The file buffer size for each part file is FileBufferSizePref * 15000. You can adjust it in steps of 15000 from the settings only. So if the dialog says "300000", 300000 is used and the entry in the config file is 20.
When downloading, downloaded data is kept in RAM until it exceeds the buffer size (and also when the last flush is more than a minute ago).
This behavior was the same in 2.2.2 and before, code wasn't changed for at least 5 years.
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

p.r.

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 50
Re: FileBufferSize
« Reply #6 on: November 07, 2009, 10:44:44 PM »

Stu Redman
Thank you for quick response.

Sorry, I deleted my previous post, the question was:
Quote
When I was using aMuled 2.2.2 the value of FileBufferSizePref in amule.conf was in percents of  VIRTUAL memory.

Now in aMuled 2.2.6, as I can understand, FileBufferSizePref means maximum memory buffer size EACH (or ALL?) file (or files?) can take in 15 000 bytes blocks.

Could someone of developers please clarify the real meaning of FileBufferSizePref in aMule?


Do File Buffers  have some relation to hashing/uploading or only downloading files?
« Last Edit: November 07, 2009, 10:50:14 PM by p.r. »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: FileBufferSize
« Reply #7 on: November 07, 2009, 10:53:17 PM »

You're welcome!
Downloading only.
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

myth

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 38
  • Offline Offline
  • Posts: 570
Re: FileBufferSize
« Reply #8 on: February 19, 2012, 02:17:14 PM »

Grabbing an old thread, but I have a question.
So the Pref is only for downloading file?

And what could we change for uploading? It's because of a problem I'm encountering: I unzipped a file on the same hard drive as aMule's files are on. Upload felt down to nearly 0 for all the time the HDD was under heavy usage.
I know that my 900 KB/s are a lot, but couldn't we buffer some more?
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: FileBufferSize
« Reply #9 on: February 19, 2012, 05:16:55 PM »

Not really I think. The download chunks are requested by the downloaders as they are needed and thus can't be precached easily.
Also 5min of unzipping don't really hurt your upload average per 24h.  :)
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

myth

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 38
  • Offline Offline
  • Posts: 570
Re: FileBufferSize
« Reply #10 on: February 19, 2012, 06:17:46 PM »

Ok. Also I just noticed that using another decompressor (maybe less aggressive) does not create the problem! :)
Logged