Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - IOzone run on QNX: Page 1 of 2 (16 Items)
   
IOzone run on QNX  
HI QNX,

I would like to run IOZONE on QNX to get performance results.

Can i get the iozone source code/ link to source code to run on QNX6.6.0

Thanks in advance

Thanks & Regards
Janardhan Reddy
Re: IOzone run on QNX  
We tried to port IOZone to QNX some time back but appeared to us not a straight-forward port, I think there were lots of
 library depencies that would need to be satisfied.

So if an internet search doesn't yield a result, I guess there is no maintained QNX port available. Maybe inside QNX for
 disk testing.

Regards,
Albrecht
Re: IOzone run on QNX  
Hi,

I can't resist a challenge, so I took a quick look.   Are you sure you were looking at the right program?  iozone itself
 seems to depend on nothing but libc (and on QNX libsocket).   The tarball includes some scripts and pieces to process 
the output with gnuplot, but you don't need them to run the benchmark; and if you do want those graphs, you can run the 
processing on some other machine after collecting the data.

I found that porting iozone was pretty straightforward - basically just copying an existing OS profile with the desired 
features, adding || defined(__QNX__) in a few places, and the usual header idiosyncrasy cleanup.   Unfortunately, the 
license for iozone prohibits publication of derived works, so I cannot post my sources - sorry.

I would also note that iozone benchmarks using standard clock interfaces, which on QNX 6.x are quite coarse (typical 
resolution ~1 ms, although if you increase the clock interrupt rate via ClockPeriod() you could probably push it down to
 100us with only a moderate overhead).   This limits the accuracy of the measurements somewhat, particularly for small 
transactions which may complete faster than 1 tick.   Adjusting to use ClockCycles() or the like for more accurate wall-
time measurements would be a more complex task.  (We, er, have an LD_PRELOAD library we use to intercept the underlying 
libc time calls and augment them with CPU cycle counter data, but again for licensing reasons I can't share this code, 
sorry.)   I don't know if this has changed in QNX 7.

-Will
Re: IOzone run on QNX  
Hi Will,

Thanks for your response.

I am looking into the latest iozone source code from netbsd.

I added some places in iozone.c with (__QNX__), while building facing lotof build errors.

As you mentioned the post because of licensing you are unable to share the source code,can you please suggest the files 
which we need to modify/tweek to port on QNX.

it will be a great help to me

Thanks & Regards
Janardhan reddy 
Re: IOzone run on QNX  
Hi,

I picked up the iozone sources from iozone.org.  From there, I basically did:

-> makefile: added a qnx target.   I used -D_FILE_OFFSET_BITS=64 -D_HAVE_ANCIC_C -DASYNC_IO -DNO_MADVISE
-> iozone.c: Add some defined(__QNX__) to get the right headers and signal handling bits; also renamed long long delay 
to tp_delay to avoid linker issues with delay()
-> libasync.c: fix includes on QNX, we need <stdint.h> and <errno.h> instead of <sys/errno.h>
-> libif.c: fix header includes with some defined(__QNX__)

NB that I'm also building with qcc in the usual way, eg. 
CC=qcc make qnx


 Hope this helps some,
-Will
Re: IOzone run on QNX  
HI Will,

Thanks for your great help,

now i am able to compile the iozone but while linking getting the error.

error log:
Building iozone for qnx

qcc -c -O3 -D_FILE_OFFSET_BITS=64 -DHAVE_ANSIC_C -DASYNC_IO -DNO_MADVISE \
	-DNAME='"qnx"' -DQNX_ARM \
	-Dqnx -D_LARGEFILE64_SOURCE  iozone.c \
	-o iozone_qnx-arm.o
qcc -c -O3 -D_FILE_OFFSET_BITS=64 -DHAVE_ANSIC_C -DASYNC_IO \
	 -Dqnx  libbif.c -o libif.o
qcc -c -O3 -Dqnx -D_FILE_OFFSET_BITS=64 -DHAVE_ANSIC_C -DASYNC_IO \
	-D_LARGEFILE64_SOURCE  libasync.c  -o libasync.o
qcc -O3  iozone_qnx-arm.o libif.o libasync.o -lrt -lpthread -o iozone
/opt/qnx660/host/linux/x86/usr/bin/i486-pc-nto-qnx6.6.0-ld: cannot find -lrt
/opt/qnx660/host/linux/x86/usr/bin/i486-pc-nto-qnx6.6.0-ld: cannot find -lpthread
cc: /opt/qnx660/host/linux/x86/usr/bin/i486-pc-nto-qnx6.6.0-ld error 1
make: *** [qnx] Error 1

Thanks in advance

thanks & Regards
Janardhan Reddy
Re: IOzone run on QNX  
Hi,

librt and libpthread aren't needed on QNX -- those functions are included in the base libc.   You can just remove them 
from the linker lines in the makefile.

-Will
Re: IOzone run on QNX  
i also some problem, can i get some help?

log as fllow:
qcc -static -O3  iozone_linux.o libbif.o libasync.o \
      -o iozone
iozone_linux.o: In function `alloc_mem':
iozone.c:(.text+0x391c): undefined reference to `shmget'
iozone.c:(.text+0x3936): undefined reference to `shmat'
iozone.c:(.text+0x394d): undefined reference to `shmctl'
iozone_linux.o: In function `start_master_listen':
iozone.c:(.text+0x75eb): undefined reference to `socket'
iozone.c:(.text+0x7612): undefined reference to `setsockopt'
iozone.c:(.text+0x7635): undefined reference to `setsockopt'
iozone.c:(.text+0x765b): undefined reference to `setsockopt'
iozone.c:(.text+0x76ab): undefined reference to `bind'
iozone_linux.o: In function `master_listen':
iozone.c:(.text+0x7811): undefined reference to `accept'
iozone.c:(.text+0x7853): undefined reference to `listen'
iozone_linux.o: In function `child_send':
iozone.c:(.text+0x79b6): undefined reference to `gethostbyname'
iozone.c:(.text+0x7a09): undefined reference to `socket'
iozone.c:(.text+0x7a5a): undefined reference to `bind'
iozone.c:(.text+0x7ad9): undefined reference to `connect'
iozone_linux.o: In function `start_child_listen':
iozone.c:(.text+0x894b): undefined reference to `socket'
iozone.c:(.text+0x8972): undefined reference to `setsockopt'
iozone.c:(.text+0x8995): undefined reference to `setsockopt'
iozone.c:(.text+0x89bb): undefined reference to `setsockopt'
iozone.c:(.text+0x8a1d): undefined reference to `bind'
iozone_linux.o: In function `child_attach':
iozone.c:(.text+0x8ba3): undefined reference to `listen'
iozone.c:(.text+0x8bc3): undefined reference to `accept'
iozone_linux.o: In function `start_child_listen_async':
iozone.c:(.text+0x945b): undefined reference to `socket'
iozone.c:(.text+0x9482): undefined reference to `setsockopt'
iozone.c:(.text+0x94a5): undefined reference to `setsockopt'
iozone.c:(.text+0x94f1): undefined reference to `bind'
iozone_linux.o: In function `start_master_send':
iozone.c:(.text+0x9a81): undefined reference to `gethostbyname'
iozone.c:(.text+0x9ac9): undefined reference to `socket'
iozone.c:(.text+0x9b1a): undefined reference to `bind'
iozone.c:(.text+0x9b80): undefined reference to `connect'
iozone.c:(.text+0x9c7d): undefined reference to `inet_ntoa'
iozone_linux.o: In function `start_master_send_async':
iozone.c:(.text+0x9db5): undefined reference to `socket'
iozone.c:(.text+0x9e06): undefined reference to `bind'
iozone.c:(.text+0x9e50): undefined reference to `connect'
iozone_linux.o: In function `sp_start_master_send':
iozone.c:(.text+0xcc21): undefined reference to `gethostbyname'
iozone.c:(.text+0xcc69): undefined reference to `socket'
iozone.c:(.text+0xccba): undefined reference to `bind'
iozone.c:(.text+0xcd20): undefined reference to `connect'
iozone.c:(.text+0xce1d): undefined reference to `inet_ntoa'
iozone_linux.o: In function `sp_start_child_listen':
iozone.c:(.text+0xcef3): undefined reference to `socket'
iozone.c:(.text+0xcf1a): undefined reference to `setsockopt'
iozone.c:(.text+0xcf3d): undefined reference to `setsockopt'
iozone.c:(.text+0xcf90): undefined reference to `bind'
iozone.c:(.text+0xcfc2): undefined reference to `listen'
iozone.c:(.text+0xcfe7): undefined reference to `accept'
iozone_linux.o: In function `sp_start_master_listen':
iozone.c:(.text+0xd187): undefined reference to `socket'
iozone.c:(.text+0xd1ae): undefined reference to `setsockopt'
iozone.c:(.text+0xd1d1): undefined reference to `setsockopt'
iozone.c:(.text+0xd230): undefined reference to `bind'
iozone.c:(.text+0xd259): undefined reference to `listen'
iozone.c:(.text+0xd27e): undefined reference to `accept'
iozone_linux.o: In function `sp_start_child_send':
iozone.c:(.text+0xd521): undefined reference to `gethostbyname'
iozone.c:(.text+0xd569): undefined reference to `socket'
iozone.c:(.text+0xd5ba): undefined reference to `bind'
iozone.c:(.text+0xd620): undefined reference to...
View Full Message
Re: IOzone run on QNX  
Hi Will,

Thanks for your support.

Able to build the iozone and running on QNX660 arm processor.

After run iozone process is getting interrupted.

ERROR log:
# ./iozone -a
        Iozone: Performance Test of File I/O
                Version $Revision: 3.408 $
                Compiled for 32 bit mode.
                Build: qnx

        Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
                     Al Slater, Scott Rhine, Mike Wisner, Ken Goss
                     Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
                     Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
                     Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
                     Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
                     Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer.
                     Ben England.

        Run began: Wed Dec 31 20:56:56 1969

        Auto Mode
        Command line used: ./iozone -a
        Output is in Kbytes/sec
        Time Resolution = 0.001000 seconds.
        Processor cache size set to 1024 Kbytes.
        Processor cache line size set to 32 bytes.
        File stride size set to 17 * record size.
                                                            random  random    bkwd   record   stride
              KB  reclen   write rewrite    read    reread    read   write    read  rewrite     read   fwrite frewrite  
 fread  freread
              64       4fsync: Function not implemented

iozone: interrupted

exiting iozone


Can you help on this what is causing this error.

Thanks & Regards
Janardhan reddy
Re: IOzone run on QNX  
HI Will,

I have resolved this fsync error by giving -l c option in make file.

Now i am able to run iozone successfully.

Thanks for your great support to execute iozone.

Thanks & Regards
Janardhan Reddy