RTEMS CPU Kit with SuperCore
4.11.3
|
Test Program for Evaluating NFS Read ThroughputThis test code allows for evaluating NFS read performance under various scenarios: More...
#include <rtems.h>
#include <rtems/error.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
Data Structures | |
struct | nfsTestReq_ |
Functions | |
rtems_interval | nfsTestRead (char *fnam, int sz, int nrd) |
Variables | |
unsigned | nfsTestReaderPri = 80 |
rtems_id | nfsTestRQ = 0 |
rtems_id | nfsTestAQ = 0 |
Test Program for Evaluating NFS Read Throughput
This test code allows for evaluating NFS read performance under various scenarios:
rtems_interval nfsTestRead(char *file_name, int chunk_size, int num_readers);
1) creates 'num_readers' threads, each opening 'file_name' for reading on a separate file descriptor. 2) creates message queues for communicating with reader threads
3) read file using nfsTestReadBigbuf() until EOF is reached
4) releases resources.
RETURNS: Time elapsed during step 3 in ms. This is measured using the system clock so make sure the test file is big enough.
nfsTestReadBigbuf() synchronously reads a block of 'num_readers * chunk_size' (which may be bigger than the UDP limit of 8k) using 'num_reader' threads to retrieve the various pieces of the big block in parallel. This speeds up things since several RPC calls can be in the works at once.
NOTES: