Skip to content

Commit

Permalink
Remove O_SYNC from the debug log files
Browse files Browse the repository at this point in the history
This was a good suggestion on the part of Michael T. Dean.  There is no
particular reason to do synchronous writes to the debug log files, and doing so
actually causes the logger to fall behind under high load.  With our writes
going to the file asynchronously, depending on the OS buffering, logging
keeps up much better.
  • Loading branch information
Beirdo committed Jun 4, 2011
1 parent cbc799c commit 3fb63e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythlogging.cpp
Expand Up @@ -97,7 +97,7 @@ FileLogger::FileLogger(char *filename) : LoggerBase(filename, 0),
}
else
{
m_fd = open(filename, O_WRONLY|O_CREAT|O_APPEND|O_SYNC, 0664);
m_fd = open(filename, O_WRONLY|O_CREAT|O_APPEND, 0664);
m_opened = (m_fd != -1);
LogPrint( VB_IMPORTANT, LOG_INFO, "Added logging to %s", filename );
}
Expand Down

0 comments on commit 3fb63e8

Please sign in to comment.