Disk Cache decrease the read and write frequency of your HD

Feature requests not specific to either the Mac OS X or GTK+ versions of Transmission
overlook
Posts: 104
Joined: Wed Feb 08, 2006 5:15 pm

Disk Cache decrease the read and write frequency of your HD

Postby overlook » Sat Feb 25, 2006 2:15 am

the disk cache feature which greatly extends the life of hard disk.

:D
:arrow:
Mac Mini late 2014 Yosemite

pepperpupper
Posts: 3
Joined: Fri Dec 19, 2008 2:22 pm

deleted

Postby pepperpupper » Sat Dec 27, 2008 12:40 pm

Deleted
Last edited by pepperpupper on Wed Jul 30, 2014 11:03 pm, edited 1 time in total.

eisa01
Posts: 123
Joined: Sat Jun 24, 2006 5:12 pm
Location: Norway

Re: Disk Cache decrease the read and write frequency of your HD

Postby eisa01 » Sat Dec 27, 2008 2:33 pm

I think transmissions already has a disk cache.

At least when I was downloading a file at close to 2 MB/s it didn't write to disk continuously. It wrote to disks at regular intervals, and I noticed it by the download speed dropping. So maybe it's a bit too aggressive since the disk becomes overloaded and Transmission has to slow down for a second?

pepperpupper
Posts: 3
Joined: Fri Dec 19, 2008 2:22 pm

deleted

Postby pepperpupper » Sat Dec 27, 2008 6:40 pm

deleted
Last edited by pepperpupper on Wed Jul 30, 2014 11:03 pm, edited 1 time in total.

exiztone

Re: Disk Cache decrease the read and write frequency of your

Postby exiztone » Mon Dec 29, 2008 7:40 pm

-
Last edited by exiztone on Wed Jul 24, 2013 5:57 pm, edited 1 time in total.

NitricJerkSud
Posts: 6
Joined: Tue Jan 20, 2009 6:54 am

Re: Disk Cache decrease the read and write frequency of your HD

Postby NitricJerkSud » Tue Jan 20, 2009 7:17 am

pepperpupper wrote:I have a powerbook with a 4200rpm drive, and at about 1mb/second it is almost impossible to use the computer for anything else but Transmission. Utorrent and LH-ABC does not seem to write to the disk as often.


I just popped in a new 320GB 7200RPM drive into my MBP this morning -- the faster drive DOES make a difference. Also, consider the fact that you're going to need as much RAM as your torrent file occupies on disk in order to eliminate READS from disk. (Because you don't want to download a piece, and NOT write it to disk. If you crash, you have to download it again.)

If you're downloading those 125+GB Nine Inch Nails torrents, a RAM cache isn't going to save you... :)

ruusperi
Posts: 1
Joined: Sun Mar 08, 2009 2:26 am

Re: Disk Cache decrease the read and write frequency of your HD

Postby ruusperi » Sun Mar 08, 2009 2:59 am

NitricJerkSud wrote:
pepperpupper wrote:I have a powerbook with a 4200rpm drive, and at about 1mb/second it is almost impossible to use the computer for anything else but Transmission. Utorrent and LH-ABC does not seem to write to the disk as often.


I just popped in a new 320GB 7200RPM drive into my MBP this morning -- the faster drive DOES make a difference. Also, consider the fact that you're going to need as much RAM as your torrent file occupies on disk in order to eliminate READS from disk. (Because you don't want to download a piece, and NOT write it to disk. If you crash, you have to download it again.)

If you're downloading those 125+GB Nine Inch Nails torrents, a RAM cache isn't going to save you... :)


Hmm I think you have somewhat misuderstood the write/read cache idea. The idea is NOT to cache everything into memory. The idea is to cache bunch of data into memory and then try to read/write it into hardisk in a one go if possible. 7200RPM hard disks does certainly help a little, but even the slowest of slowest modern hard disk can easily keep up with 10-20MB/s read/write speeds . Unfortunately the bigger problem is the harddisk seeking. Transmission is downloading/reading a lot of pieces from different parts of files which causes the hard disk to seek up & down all the time causing the read/write throughput to collapse. And this is the part where the cache steps in.

For example I have a 110M Internet connection and Transmission is the limiting factor in download speeds. I can only get around 3-4MB/s download speeds into my external USB harddisk with Transmission because it has either poor or too small write/read-caching.

Azureus does a lot of better after little bit of tweaking. I set the cache size to 64MB and enabled option to asking Azureus/Vuze to cache the data more to memory if possible, also took out the option to write complete pieces to disk as soon as it's ready.

There difference is huge, same torrent in Transmission causes the write-led on the drive to keep on constantly and the download speeds are in 3-5MB/s moving up and down all the time and the drive itself is clearly struggling. Azureus/Vuze on the other hand keeps chuggin along 11MB/s almost instantly and the hard disk light goes on and off - sort of pulsing even when it's hogging data at much faster rate. This is the reason why I'm not using Transmission at the moment, IMHO it's unusable on faster connections.

Is it possible to increase the read/write cache size in OSX Transmission? Maybe through some sort of plist hack? Most of modern machines have huge amount of memory from 2-4GB so why don't we just use it. Unused memory is wasted memory.

I don't mean to sound harsh,.Transmission is an excellent piece of software. It's much lighter, prettier, easier to use than the Vuze, but when it comes to raw speed Vuze/Azureus simply beats the cr*p out of Transmission and it seems only because of the better caching options.

Sorry about the spelling mistakes + crappy grammar. English isn't my native language and also I'm typing this message at around 05:00 ZZz.zzZzzzz :).

weiribao
Posts: 1
Joined: Mon Jun 15, 2009 3:06 pm

Re: Disk Cache decrease the read and write frequency of your HD

Postby weiribao » Mon Jun 15, 2009 3:12 pm

I am a little surprised when I discovery the fact that transmission dosn't support memory cache. I think this is quite a necessary and desirable feature for modern bt client. Hopefully transmission's developers can add this feature soon.

rev
Posts: 4
Joined: Sun Sep 13, 2009 5:01 pm

Re: Disk Cache decrease the read and write frequency of your HD

Postby rev » Sun Sep 13, 2009 5:03 pm

Hello,

Do you have any plans on adding this great and needed feature? :(

Regards,
rev

olmari
Posts: 3
Joined: Tue Sep 15, 2009 12:19 pm

Re: Disk Cache decrease the read and write frequency of your HD

Postby olmari » Tue Sep 15, 2009 2:32 pm

Indeed, good caching is more and more imperative with faster internet-connections...

radir
Posts: 18
Joined: Sat Apr 18, 2009 4:47 pm

Re: Disk Cache decrease the read and write frequency of your HD

Postby radir » Mon Nov 02, 2009 10:12 pm

+1 for this enhancement request

Although usually all OS using some kind of file cache I too think it would be great to have it implemented, would help in case of fast connection and also in terms of hdd heat, noise, lifetime.

Using for example a solid AVL balanced tree library to store chunk data indexed by last access time could keep the most requested (seeded) piece of data in memory for fast(er) access without re-read it from hdd.

Similar approach in case of downloads to keep x number of consecutive chunks in memory then write it in one shot could speed up things and also would increase hdd performance/lifetime.

Of course on memory limited system caching could be disabled and size of cache should be configurable.

I see ticket #1521 is opened to address this but last response is 5 months old.

Thanks and regards.

jch
Posts: 174
Joined: Wed May 13, 2009 12:08 am

Re: Disk Cache decrease the read and write frequency of your HD

Postby jch » Mon Nov 02, 2009 11:00 pm

I may be incompetent, but I fail to see how a user-space cache is better than using the operating system's buffer cache. Could you please explain?

The buffer cache has the following advantages:

* it shrinks automatically on memory shortage, even when the shortage is due to another application (which Transmission knows nothing about);
* the data structures used by the OS cache have been carefully tuned, way more than what the Transmission developers could do;
* going through the OS cache avoids one memory to memory copy.

Please point me to any information about how a user-space cache actually improves things.

(Note that it may be the case that you are using an operating system that happens to have a badly implemented buffer cache. In that case, please complain to your OS vendor, not to us.)

--Juliusz


radir
Posts: 18
Joined: Sat Apr 18, 2009 4:47 pm

Re: Disk Cache decrease the read and write frequency of your HD

Postby radir » Tue Nov 03, 2009 8:57 pm

Juliusz,

Actually I said something should be done as cache would improve things. If the idea of user-space caching is not welcomed I am happy to accept any other improvement. But:

1. as I see in ticket 1521 so far the only file management is done in a way of managing couple of active files, "IO caching in libtransmission is very crude. We keep a short list of the most active files and leave them open, leaving the caching to the OS." - so relying on OS caching which is too generic therefore not very effective for torrent load pattern: many small random read. My understanding of the ticket is that current transmission is io extensive. Also as per this thread users have the same experience.

2. posix_fadvise you suggesting is not cross-platform supported.

3. There should be a reason if other torrent clients implement such user-space cache. :-)

4. Hm, complaining to OS vendor ... I can be wrong of course but OS vendors fine tune their file cache subsystem as much as they can but I guess if Ubuntu, FreeBSD and Mac users experience similar symptom using transmission then probably it might be application related?

All my gratitude to all transmission developers, great application, I like it very much - but here I think there is a valid "requirement" (admitting it sounds odd in relation to a community developed open/free sw).

jch
Posts: 174
Joined: Wed May 13, 2009 12:08 am

Re: Disk Cache decrease the read and write frequency of your HD

Postby jch » Wed Nov 04, 2009 7:34 pm

I've got a working write cache for transmission. I've been unable to measure any improvement, but then I'm using a modern OS with a modern filesystem and a very high commit time (10 minutes).

I'll tune it some more, then publish the patch; we'll see if anyone can collect any hard performance data.

radir wrote:There should be a reason if other torrent clients implement such user-space cache.


What is that reason?

I'm genuinely curious: I haven't seen any hard data on the performance benefits of a user-space disk cache in BitTorrent. If the claimed benefits actually exist, it shouldn't be hard to prove it.

--Juliusz


Return to “Requests”