On 03/02/2018 11:42 AM, Aziz Rozyev wrote:
man page quote is related to the Valery’s argument that fsync wont affect 
performance, forget it.
Of course it affects performance. But as for how much: it depends on many factors. It's possible to build servers where the overall effect will be negligible.


It’s nonsense because you’re trying to solve the reliability problem at the 
different level,
it has been multiple times suggested here already by maxim and Paul, that it’s 
better
to invest to the good server/storage infrastructure, instead of fsyncing each 
PUT.
Yes, it has been suggested multiple times, the only problem is it's not true. No matter how good server/storage you have, if you write to unbacked memory buffers (which nginx does), you are toast.


Regarding the DB server analogy, you’re still not save from the power outages 
as long as your
transaction isn’t in a transaction log.

If you’re still consent with syncing and ready to sacrifice your time, try 
mounting a file system
with ‘sync’ option.

That's what really kills performance, because of the async nature of nginx. That's why I'm proposing an option to do the fsync at the end of the PUT (or maybe even the whole operation) in a thread(pool).

If you care about performance and reliability, that's the way it has to be solved.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to