On Thu, Jun 10, 2010 at 8:46 AM, Rainer Gerhards <[email protected]> wrote: > > I think you misunderstand that cache. If there would be no cache, that would > mean we would need to close the current dynafile and open a new one whenever > the action needs to route a message to a different file. That would have > enormous performance impact. Think about a dynafile action as one that > potentially writes to 100 files at once. Then think about having only one > file open at one time and then think about the message stream.
I should rephrase - I do understand the requirement for such a caching system, however I dislike the implementation. I would prefer a simpler lookup method without this idea of a cache size, forced expiration, or files open forever. There is no deterministic expectation on what happens when a file enters the cache, it is entirely dependent upon what takes place with _other_ files. I would prefer to have a simpler lookup cache with a negative result triggering an open, and that being the only expectation of the cache. The only limit to the number of files currently open should be the open files limit provided by the OS. I am curious: how is an output file identified at present? -Aaron > There are a number of subtle issues, one being the dynafile cache (one action > can write to more than one file), another one being the potential for async > io (which is not really enabled in v4 but will be in v5). If we had just a > single lock for (logical) writing, we could not fill up a buffer and > physically write it out only if it were full. So, for ZIP, you would need to > compress single messages. That means a sharp drop in compression ratio (I > guess you can not achieve more than 10 to 20% on single messages if you would > like to have recovery records). I don't fully understand how the async writer interacts with an action thread yet... is it a one-action-many-writers relationship? -Aaron _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

