K
K
kkoshakk2016-08-08 15:40:00
Nginx
kkoshakk, 2016-08-08 15:40:00

What is the size of an atomic write to a disk file for Ubuntu 16.04?

I can't decide on the size of the buffer for access_log, the manual says that the size of the buffer should be no larger than the size of an atomic write to a disk file. What is the size of this atomic record?
log_format compression '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" "$gzip_ratio"';
access_log /var/log/nginx-access.log compression buffer=??????k;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2016-08-08
@kkoshakk

Look at the block size. Most likely it is already 4kb, but it may be less.
Set it to a multiple of the block size and don't worry.

S
sim3x, 2016-08-08
@sim3x

Don't use log compression
Use logrotate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question