Hello
We are developing applications for high quality video streaming. And we
need high I/O performance for drivers and IPC. But our test shows that
simple I/O operations are very, very slow under QNX6.2. Under Linux the
same operations with device drivers are running 10 times faster and more.
What’s wrong? Is our approach to use mixed device drivers wrong?
Should we place all of our code in one process and not use I/O operations
(IPC) between device drivers and processes (filters)?
Who can explain this behaviour under QNX6.2 ? Please, have a look at
following
simple program:
Example:
/* hello.c */
#include <stdio.h>
#include <unistd.h>
#include <time.h>
int main (void)
{
int i;
time_t start;
start = time (NULL);
for (i = 0; i < 10000000L; i++)
write (STDOUT_FILENO, “Hello, world!”, 13);
fprintf (stderr, “Time difference: %d sec.\n”, time (NULL) - start);
return 0;
}
Result under Linux:
Linux on Pentium-III 1.3 GHz:
uname -a
Linux mops-i 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown
gcc -O2 -march=pentium hello.c -o hello
time ./hello >/dev/null
Time difference: 4 sec.
real 0m3.224s
user 0m1.320s
sys 0m1.800s
Result under QNX6.2:
QNX6.2 on Pentium-4 1.6 GHz:
uname -a
QNX neutrino1 6.2.0 2002/02/16-03:25:28est x86pc x86
gcc -O2 -march=pentium hello.c -o hello
time ./hello >/dev/null
Time difference: 47 sec.
47.15s real 4.34s user 5.17s system
Same test with 40 KByte output buffer, instead of “Hello, world!”:
Result under Linux:
Time difference: 3 sec.
Result under QNX6.2:
Time difference: 56 sec.
Same test with output to filesystem:
time ./hello >/tmp/dummy
ls -l /tmp/dummy
-rw-r–r-- 1 root root 130000000 Jun 7 13:22 /tmp/dummy
Result under Linux:
Time difference: 8 sec.
Result under QNX6.2:
Time difference: 170 sec. (170.40s real 6.06s user 16.46s system)
Same test with output to ring buffer as device driver “emlog”
(1 MByte capacity):
time ./hello >/dev/emlog
Result under Linux:
Time difference: 7 sec.
Result under QNX6.2:
Time difference: 107 sec.
Thanks for hints to solve the problem.
Regards
Dr. G. Geigemüller
BitCtrl Systems GmbH
Weißenfelser Str. 67
04229 Leipzig, Germany
E-Mail: info@bitctrl.de
Internet: www.bitctrl.de, www.bitctrl.com
Tel: +49 341-490670
Fax: +49 341-4906715