Optimize disk queue cleanup logic by saving the last file offset, and instead of checking all files, focus on the relevant ones.