Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Server Administration Documentation | 2025.2

# Observe the effect of lockless reads

To determine whether read locks are impacting performance (and the extent to which enabling lockless reads has improved performance), you can examine the server logs, or you can use the `-Ztrack` flag to output, for any given command, the lines that would be written to the `P4LOG`. For example, the

    p4 -Zpeeking=1 -Ztrack sync

command produces output for 11 database tables. The relevant lines here are those that refer to "`locks read/write`".

Copy

    ...
    --- db.counters
    ---   pages in+out+cached 3+0+2
    ---   locks read/write 1/0 rows get+pos+scan put+del 1+0+0 0+0
    --- db.user
    ---   pages in+out+cached 3+0+2
    ---   locks read/write 1/0 rows get+pos+scan put+del 1+0+0 0+0
    ...

The `1` appearing in ("`locks read/write 1/0`") every table’s locking results shows one read lock taken per table. By contrast, the diagnostic output from the

    p4 -Zpeeking=2 -Ztrack sync

command

    ...
    --- db.counters
    ---   pages in+out+cached 3+0+2
    ---   locks read/write 0/0 rows get+pos+scan put+del 1+0+0 0+0
    ...

shows that the sync operation completed without any read or write locks required on `db.counters`.

When peeking is enabled, many commands show fewer locks taken and perhaps `read/write 0/0` locks taken.

Your search for returned results