Re: IOCP buffers and page locks



Attempts to do better what Windows does internally can easily backfire in
the sense that attempts to improve performance could degrade performance.


<eselk@xxxxxxxxxxxx> wrote in message
news:1814a834-df83-433b-84ba-88647fa777e8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If I have one buffer, lets say it is 12k and is aligned on 4k pages so
it takes up 3 full pages. If I break that buffer in to smaller
chunks, lets say 1k each, and I make 12 calls to WSARecv (or WSASend
or AcceptEx). That is still only 3 page locks, right? So that should
use less resources than calling WSARecv 12 times with seperate buffers
that may each be on a seperate page, correct?

Or does each call to WSARecv use up another page lock, even though the
page that the buffer is on is already locked? Seems impossible, if
page locks are anything like I would expect. I know each call to
WSARecv uses a tiny bit of non-paged memory, for some pointers and
stuff.

When people are talking about IOCP and say to keep the number of "page
locks" to a minimum, do they really mean the number of "locked
pages"? If page locking works the way I would imagine, each lock just
incriments a counter and doesn't use any additional resources, so
locking the same page 100 times shouldn't matter --- but locking 100
pages once, would.




.



Relevant Pages

  • Re: IOCP buffers and page locks
    ... If I break that buffer in to smaller ... chunks, lets say 1k each, and I make 12 calls to WSARecv (or WSASend ... page locks are anything like I would expect. ... If page locking works the way I would imagine, ...
    (microsoft.public.win32.programmer.networks)
  • IOCP buffers and page locks
    ... If I have one buffer, lets say it is 12k and is aligned on 4k pages so ... chunks, lets say 1k each, and I make 12 calls to WSARecv (or WSASend ... page locks are anything like I would expect. ... If page locking works the way I would imagine, ...
    (microsoft.public.win32.programmer.networks)
  • Re: [PATCH 0/3] 64-bit futexes: Intro
    ... i suspect _any_ abstract locking functionality around a data structure ... tightly coupled to the exact details of which atomics are fast on a ... For example, some loads are almost entirely read-read locks, with only ... There we can just do a write to unlock. ...
    (Linux-Kernel)
  • Re: Transaction Isolation Level
    ... what size servers are you working ... and only have to specify locking hints when we ... need locks. ...
    (microsoft.public.sqlserver.server)
  • Re: row vs page locking...
    ... so they automatically escalate to page level locks. ... 'Lock Escalation' - see Books Online. ... SQL Server 2005 is going to have a Snapshot ... Good old fashioned locking is less sexy, but I find, more productive! ...
    (microsoft.public.sqlserver.server)