optimize the log size