murvinlai
murvinlai

Reputation: 50365

is server log slow or fast

when server (apache or nginx) logging http request into the log file, (i.e. append entry at the end), is it slow or fast? when if there is very high volumn traffic, will writing to log file slow down performance?

-------- More ------------ and usually, how many entries can be logged each second?

Upvotes: 0

Views: 706

Answers (3)

Linus Kleen
Linus Kleen

Reputation: 34632

I second all answers. Here's an additional thought: if you're concerned about speed, don't use the same physical device to do the logging and the serving.

Upvotes: 0

Martin v. Löwis
Martin v. Löwis

Reputation: 127467

Logging itself will be fast: the data put into the log file will typically be smaller than the data sent back to the browser, plus the hard disk has higher throughput than the network interface.

What may slow down the logging is when you try to do DNS reverse lookups for each IP address, so make sure to turn that off.

Upvotes: 3

John Zwinck
John Zwinck

Reputation: 249223

It's fast unless you have such an extreme workload that it slows down, in which case you might want to upgrade the disk where the logs are written.

Upvotes: 2

Related Questions