aMule Forum

English => aMule Help => Topic started by: moron on October 09, 2007, 06:07:58 PM

Title: FileBufferSize
Post by: moron 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"?
Title: Re: FileBufferSize
Post by: wuischke 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
Title: Re: FileBufferSize
Post by: moron 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.
Title: Re: FileBufferSize
Post by: wuischke 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.
Title: Re: FileBufferSize
Post by: moron 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
Title: Re: FileBufferSize
Post by: Stu Redman 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.
Title: Re: FileBufferSize
Post by: p.r. 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?
Title: Re: FileBufferSize
Post by: Stu Redman on November 07, 2009, 10:53:17 PM
You're welcome!
Downloading only.
Title: Re: FileBufferSize
Post by: myth 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?
Title: Re: FileBufferSize
Post by: Stu Redman 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.  :)
Title: Re: FileBufferSize
Post by: myth 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! :)