FC write policy?

Report bugs or suggestions around FancyCache
Post Reply
Bjameson
Level 6
Level 6
Posts: 62
Joined: Mon Nov 08, 2010 12:00 pm

FC write policy?

Post by Bjameson »

I think I have a pretty good idea how FC caches its write data. But just to make sure, could you please answer this:

Suppose I have 256MB of L1 and 3GB of L2 to hidden memory. Write delay is set to 300 secs.

I create a 1GB file and immediately delete it again. How will FC handle this?

- FC eventually writes the entire 1GB to disk, followed by the delete.
- FC is smart enough to delete the file from the cache, thus preventing writes to disk altogether.

I'd be very interested to know for sure.
Thanks.
User avatar
Support
Support Team
Support Team
Posts: 3634
Joined: Sun Dec 21, 2008 2:42 am

Re: FC write policy?

Post by Support »

Hi Bjameson,

Currently FC is not smart enough. ;)
So the answer is this one,
Bjameson wrote:FC eventually writes the entire 1GB to disk, followed by the delete.
Christodoulosk
Level 1
Level 1
Posts: 3
Joined: Wed Nov 03, 2010 10:58 pm

Re: FC write policy?

Post by Christodoulosk »

What happens when a file is on the cache and before it is writen in the disk the file changed?
Is the writen file on the disk the changed one?


Sorry for my English :)
User avatar
Support
Support Team
Support Team
Posts: 3634
Joined: Sun Dec 21, 2008 2:42 am

Re: FC write policy?

Post by Support »

Christodoulosk wrote:What happens when a file is on the cache and before it is writen in the disk the file changed?
Is the writen file on the disk the changed one?
Yes, the data written to the disk is always the latest in the cahce.
Christodoulosk
Level 1
Level 1
Posts: 3
Joined: Wed Nov 03, 2010 10:58 pm

Re: FC write policy?

Post by Christodoulosk »

So it is correct to asume that the total writen data on the real disk is fewer when the FancyCache is on. ?
User avatar
Support
Support Team
Support Team
Posts: 3634
Joined: Sun Dec 21, 2008 2:42 am

Re: FC write policy?

Post by Support »

theoretically it is. But because of the program implementation limit, sometimes it isn't.
User avatar
Support
Support Team
Support Team
Posts: 3634
Joined: Sun Dec 21, 2008 2:42 am

Re: FC write policy?

Post by Support »

Now the write amplification bug has been fixed in version 0.4.1. So the total written data to the real disk is fewer if defer write is on.
Christodoulosk wrote:So it is correct to asume that the total writen data on the real disk is fewer when the FancyCache is on. ?
Post Reply