A cow-orker of mine came across the following, using QNX 4.24:
His system has to periodically gunzip a file, to produce a very large (>100
mbytes) file. He does this using the system() call, at a low priority.
gunzip does run at the low priority, but he found that processes at a higher
priority would still occasionally pause for as much as 100 milliseconds or
more, until the entire gunzip finished. This would cause these processes to
Upon investigation, it appeared that the problem was that Fsys was using up
the CPU at high priority, most likely when flushing the cache when it became
full. To test this, he wrote a small utility that took the stdout of gunzip
and wrote it to disk in small chunks, using synchronous writes. This should
prevent the cache from ever filling up. Sure enough, this reduced the delays
to below 10 msecs, which were manageable.
Does anyone have a better explanation for what was going on, and perhaps a
better workaround? The same issue seems to be present in 4.25, but I haven’t
spent much time trying to verify it.
Any comments would be appreciated.