Revenge of the disc cache

Vincent Sanders vince at netsurf-browser.org
Wed Apr 1 09:30:22 BST 2015


On Wed, Apr 01, 2015 at 12:16:22AM +0100, Chris Young wrote:
> On Tue, 31 Mar 2015 23:12:04 +0100, Vincent Sanders wrote:
> 
> > In an attempt to address this I have recently reworked the handling of
> > small files within the cache. There are now a small number of
> > relatively large files into which all small objects are placed. This
> > has resulted in the majority of objects (>70%) being held in these blocks
> > rather than in separate files on disk.
> > 
> > The resulting cache directories have a correspondingly smaller number
> > of files and directories within them and should (I hope) exhibit
> > greatly superior performance.
> 
> There's something not quite right, as I'm not getting the "m"
> directory or any contents created, resulting in things like this:
> (4.286992) content/fs_backing_store.c get_store_entry 844: url:http://www.google.co.uk/images/icons/product/chrome-48.png
> (4.287125) content/fs_backing_store.c fetch 1845: retriving cache data for url:http://www.google.co.uk/images/icons/product/chrome-48.png
> (4.287197) content/fs_backing_store.c fetch 1870: Created new heap allocation 0x55ff93a0
> (4.287266) content/fs_backing_store.c store_open 1058: opening PROGDIR:Users/chris/Cache/m/O/Y/6/BW/Y/OQZTNMA
> (4.287462) content/fs_backing_store.c store_read_file 1786: Open failed
> (4.287533) content/fs_backing_store.c entry_release_alloc 1713: freeing 0x55ff93a0

the file cannot be opened at that path for some reason

> 
> I have "d" and things in "d".
> 
> pread/pwrite() do not seem to be working here either, they just return
> -1?
> (4.303433) content/fs_backing_store.c fetch 1870: Created new heap allocation 0x53a517c8
> (4.303736) content/fs_backing_store.c store_open 1058: opening PROGDIR:Users/chris/Cache/mblk/A
> (4.304096) content/fs_backing_store.c store_read_block 1757: Read -1 of 506 bytes into 0x53a517c8 from 0x19000 block 100
> (4.304178) content/fs_backing_store.c entry_release_alloc 1713: freeing 0x53a517c8
> 
> (10.389859) content/fs_backing_store.c store_open 1058: opening PROGDIR:Users/chris/Cache/dblk/A
> (10.390208) content/fs_backing_store.c store_write_block 1609: Wrote -1 of 5430 bytes from 0x534893f8 at 0x252000 block 297
> 
> I have those two files but they are both 0 bytes.

pread is failing because the files are empty and should be at least
100k for the metadata

pwrite failing like that is the underlying cause of the block cache
failing for you.

I have extended the logging in the backing store, please can you clean
your cache directory out and browse a few pages, let the cache write
out and then send me the full log so i can see what is
happening. perhaps the amiga pwrite operation does not do what is
expected and I need to create a platform wrapper.

I will suggest creating a bug in the tracker and attaching teh log is
the best way for this info not to get lost.

> 
> Any ideas?
> 
> Chris
> 
> 

-- 
Regards Vincent
http://www.kyllikki.org/



More information about the netsurf-dev mailing list