Re[2]: How does disk caching work?

From: Q?=Igor ShmuklerQ=20?= (shmukler_at_mail.ru)
Date: 04/20/04

  • Next message: Scott Lambert: "Re: command piped into bzip not using all available CPU"
    To: Q?=Uwe DoeringQ=20?= <gemini@geminix.org>
    Date: Tue, 20 Apr 2004 02:06:29 +0400
    
    

    > > Sorry, I shouldn't have been lazy and actually looked up the settings.
    > > Yes, those are the settings I was reffering to. Someone else had cranked
    > > them up so that the machine was maintaining about 1.7G in cache; he said
    > > that he'd noticed a reduction in disk IO when he did that. I haven't
    > > been able to see any difference in disk IO, though it seems logical that
    > > setting cache too high would hurt write caching and actually increase
    > > disk IO. It's currently set to whatever the kernel thought best, so I'll
    > > just leave it there.
    >
    > Well, I'm afraid your colleague must have been imagining things. The
    > cache queue ('Cache' column in 'top') is just a phase in the laundering
    > procedure (VM page recyling) between the inactive queue ('Inact' in
    > 'top') and the free queue ('Free' in 'top'). So these variables have
    > nothing to do with disk i/o performance.

    I am not sure you are correct here. I understand things very differently.
    Why it is a fact that number of pages in the cache queue does not affect IO throughput, changing vm setting such as:
    vm.stats.vm.v_cache_min, vm.stats.vm.v_cache_max, vm.stats.vm.v_free_target and vm.stats.vm.v_free_min should have an effect on disk IO.

    The very reason JD came up with cache pages is to minimize IO traffic. If we require lagrer number of free pages we cause OS remove references at earlier point. This should cause kernel re-read some of the pages that otherwise would be just requeued to active queue.

    Having larger cache queue would require VM to start cleaning dirty pages earlier, which results in some additional write traffic as well. However, this is not that bad, because here it is a zero sum game. If pages to become free, they would have to written out regardless of cache queue size, just at a later point. However there is a benefit to a larger cache bucket. The upside is that if machine often experiences burst in memory demand (pretty much any real-world server would), you are able to accamodate changing load without blocking.

    IS.

    _______________________________________________
    freebsd-performance@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-performance
    To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"


  • Next message: Scott Lambert: "Re: command piped into bzip not using all available CPU"

    Relevant Pages

    • Re: Power failure
      ... There is no option named "make startup disk". ... I think it should be no problem at all to make that emergency boot CD from my system... ... cmos/bios settings. ... Further they re-installed her hard disk last August and the store gave CD's as well for system restore. ...
      (microsoft.public.windowsxp.general)
    • Re: Slow performance
      ... I realize that the pagefile usage is excessive and I need to reduce memory ... I've never messed with those settings before. ... Peak are greatly in excess of the installed RAM. ... The Disk Defragmenter report shows you have minimal free disk space. ...
      (microsoft.public.windowsxp.perform_maintain)
    • RE: I hope someone can help....CD-RW not seeing anything
      ... "boot from disk". ... I checked my BIOS settings, ... > Device Manager shows the correct drive info and it says the devise is working ... > there are other programs and software updates not installing correctly. ...
      (microsoft.public.windowsxp.general)
    • RE: I hope someone can help....CD-RW not seeing anything
      ... I logged in on a different administrator profile, ... > "boot from disk". ... I checked my BIOS settings, ... >> to uninstall the devise and restart, now it shows the drive to be only CD ROM ...
      (microsoft.public.windowsxp.general)
    • Mandrake Woes
      ... I got a cheap computer from eBay for a Linux box, a Kayak XAs, monitor ... Installation was fun and easy for the first disk. ... Error installing another ... But when I restarted Gnome the settings didn't take effect, ...
      (comp.os.linux.setup)