Atomic in general means the operation cannot be interrupted will complete or have no effect. When writing files, that is accomplished by writing to a temporary file then replacing the original with the temporary when the write completes.
A crash while writing an atomic file means the original is not modified and there is a garbage file that can be deleted. A crash while writing normally would mean an expected good file is corrupt.
Performance wise the cost is minimal. During the write you will have two copies of a file. The file replace is a very simple operation at the file system level.
Edit: thanks zneak
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…