Hello! First of all, I don't know what is implemented in the darwin kernel at all, but here are some of my thoughts about this topic: Preventing disk access for starting applications if nearly impossible, because the data has to be read out for it. It can only be improved by caching all data that was read or reading out sequentially (if possible) data, that will be used. In an offline-situation it is possible to calculate what is the best way to read and cache disk-data, but in the online-situation it is somehow hard to tell which data could be read next. It is easy to guess if someone opens a file, that and begins to read it sequentially, that he could read the whole file, so the system could begin to cache it, if memory is available and no other disk-access is forced. This all shouldn't be a problem which is new to the world, so one should find some online-algorithms with a good competivness in the appropriate text-books. One question would be, how swapping is implemented. There has to be some way of telling the system, that the swap files don't have to be cached. Caching of swap-space is somehow stupid :) By using caches, one could also cache disk-write-access, trying to reduce disk-access at all, enhancing spin-down-times and for mobile users this should reduce battery usage. I was thinking of it some while ago, but hadn't had the time to look at the different parts of darwin related to disk-access. Message: 4
Date: Thu, 16 Jan 2003 17:24:53 +0000
Subject: Disk access management and poor performance
From: John Hunter <johnhunter@netcourrier.com>
To: darwin-kernel@lists.apple.com
Hello,
I get the impression that many slowdowns in OS X are caused by an
application causing a lot of disk access, which for some reason brings
down the performance of other processes, even if they don't require so
much disk access. For example, contextual menus in the Dock are
terribly unresponsive while an application is lauching, which leads to
stupid Dock behaviour if items are being added or removed (that's my
personal experience on a Titanium Powerbook with loads or RAM);
sometimes it is difficult only to drag a window.
I was wondering why that is?
Also, wouldn't it be possible for the kernel to implement some sort of
throttling policy for disk access (for direct file i/o and for disk
access caused by virtual memory paging)? Isn't that done on other OSes?
I remember an early version of Omniweb had a terrible memory leak. It
was thrashing memory so quickly that it was all but impossible to
force-quit it! It's not good enough that an application can't crash the
whole system, if it can make it so slow as to be unusable...
I would be grateful for insights from kernel gurus!
John
-- Greetings Matthias Kretschmer _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.