Resolved a small performance problem by putting the write thread to sleep each second.