Running a wire?

We have cases where we write a lot of log files to the host, increasing the amount of I / O on the host. Is there a good open source explorer for wired solutions.

The application language is C ++ on Red Hat Linux 3.

+1


source to share


6 answers


A very simple logging function is to use syslog and use (after proper configuration) the syslog daemon to send it to a remote server.

Take a look at:

openlog()

syslog()



closelog()

and

syslog.conf

+3


source


There are magazine libraries that can help you. depending on your application language. But if the i / o issue is an issue, maybe network bandwidth is the big issue.



+1


source


First set of questions:

  • Do you need all these log files?
  • All time?
  • Can you control how many entries are happening?
  • Why not?

Second set of questions:

  • Why are your journal entries slower?
  • Are you using inappropriate operations (like O_SYNC or related parameters in POSIX)?
  • How many disk drives do you have?
  • Can you get different log files on different drives (or at least have log files on a different drive where other files are stored)?

As @igalse reports, there are log libraries available. For C ++, you should look at what's available in Boost , but there are undoubtedly other sources as well.

+1


source


For C ++, Boost does not contain a logging library. But you can use the most advanced candidate written by John Toho here .

It allows you to filter out some of your logging (you'll probably need it if logging is so important that it becomes a performance issue) and configuring different assignments like stream.

+1


source


If the I / O input on the host is unduly affected, then in my opinion you either:

  • Doing FAR Too Much Logging - Logging is enough to get close to IO write speed on a consistent basis, probably too much, as even the most modest hardware can comfortably run a few megabytes per second without issue.
  • Doing too many flushes of your logs is more likely. Syslogd dumps the log quite heavily by default (too much for log-intensive applications) - this is so the log files are durable in case of failure but generate a lot of IO. Syslogd can be reconfigured for each file (see its man page) to not dump files as often.

Registering with a network server will not solve these problems if it has the same problem - in fact it will make them worse if multiple hosts register on the same server.

0


source


The application language is C ++ on Red Hat Linux 3.

-1


source







All Articles