A disk drive is disclosed which executes a rotational position optimization (RPO)
algorithm to select a next command to execute from a command queue relative to
an estimated access time. If an external vibration is detected, the RPO algorithm
increases at least one of an estimated seek latency, an estimated settle latency,
and an estimated rotational latency for each command in the command queue.