The db.monitor table tracks running Perforce Server processes. You can access db.monitor information by running the p4 monitor show command. The p4 monitor command is similar to the Linux ps command.
The information in the db.monitor database table is transient and is not included in checkpoint operations.
In general, access to db.monitor by the server should be very quick. However, if you are seeing long write holds on the db.monitor table, those long locks can indicate a slow or overworked I/O system.
In this case, putting db.monitor on a temporary filesystem (tmpfs) can be a solution to the long write locking and associated performance problems.
The size of tmpfs depends on how big your db.monitor grows. In general, 20MB is more than sufficient size for most Perforce deployments..
Below is a good reference for creating a tmpfs.
Some Linux distributions mount tmpfs at the /dev/shm location by default.
Moving db.monitor to tmpfs
To move your db.monitor to tmpfs, first stop the server, then move the db.monitor file (using mv), and then create a symlink from P4ROOT/db.monitor to a db.monitor on tmpfs. For example:
mv db.monitor db.monitor.old
ln -s /dev/shm/db.monitor db.monitor
You can perform this move without shutting down the server, if you use the global -c flag to lock the server database files first..
p4d -r . -c "mv db.monitor db.monitor.old;ln -s /dev/shm/db.monitor db.monitor"
If you would like to keep the existing process info, move db.monitor to tmpfs and soft link it with one step, as follows:
p4d -r . -c "mv db.monitor /dev/shm;ln -s /dev/shm/db.monitor db.monitor"