Re: KAIO vps, and bufwaits
Posted in 1998
David Williams wrote: > In article <6bq06q$8tp$1@news.xmission.com>, Art S. Kagel > <kagel@ns1.bloomberg.com> writes > >On Mon, 9 Feb 1998, Tony Tyrwhitt-Drake wrote: > >When a thread needs a buffer to update and the page is not already in > >the buffer pool the thread uses a random hash to select an LRU to get > >the buffer from. If this LRU is not locked by another process doing > >the same thing the thread acquires the lock on that LRU queue takes > >the Least Recently Used clean buffer, moves it to the LRU queue's > >dirty list, locks the buffer page and releases the lock on the LRU. > >If the LRU is already locked it spins (BUFWAIT) for a while trying a > >few more times to get a lock on that LRU if not it rehashes to another > Are you sure it tries several times, I though the manual said it only > tried once and then hashed onto the next queue. > PS I wonder what the random hash function is? It can't be that random > since it must be only a few instructions long.. > No, the manual only states that if the process cannot get a latch on the LRU it rehashes, it does not discuss the efforts the thread makes to try to acquire that latch. The BUFWAITS are the number of times a thread had to spin and reawake to try a latch again. This can happen also when reading a new page into a clean buffer so one might also want to take dskreads into consideration when examining BUFWAITS (I'd forgotten that last in prior postings). Art S. Kagel