Home |
Function xn_add_host_table_entry Function xn_delete_host_table_entry Function xn_interface_open_config Function xn_interface_ethernet_statistics Function xn_interface_statistics Function xn_ioacc_init Function xn_send_ethernet_frame Function cb_wr_screen_string_fnc Function cb_rs232_connection_lost_fnc |
Function xn_ioacc_initInitializes the I/O Accelerator for read-ahead and write-behind file I/O for the HTTP, FTP, SMB, and SMB3 servers. To use this function, header file Ioacc.h must be included. void xn_ioacc_init(int MaxFiles, int BufferSize, int Priority, UINT Flags); ParametersMaxFilesMaximum number of files to be managed simultaneously by the I/O Accelerator. If more files are opened at run-time, the additional files will be handled with synchronous file I/O. BufferSizeSize of the disk I/O buffers to use. The I/O Accelerator will allocate two buffers of this size per file using malloc(). This parameter must be a multiple of 4k. Typical values are 8k or 64k. PriorityRTKernel-32 priority for the I/O Accelerator thread(s). Value 0 will use RTKernel-32's default priority. FlagsA combination of the following values:
The I/O Accelerator can speed up file I/O operations of the HTTP, FTP, SMB, and SMB3 server. The degree of performance improvement depends on many factors such as speed of the CPU, speed and latency of the disk devices, parameters BufferSize, Priority, flag IOACC_PERFILE_THREAD, etc. For fast hard disks, the speed gain may be marginal but will be significant for disks with high latencies. For files to be read by a server, the I/O Accelerator prereads data into the two buffers it has available per file. Thus, the requested data is already available when the servers needs the next chunk of data. For write access, the I/O Accelerator merely copies the data to be written to a buffer and returns immediately. The actual write operation is then performed later in a separate thread. Note that write-behind incurs a data integrity risk because a failed write operation is not passed back to the server. Thus, specify flag IOACC_WRITE only if this is acceptable. Files opened for read and write will be handled by the I/O Accelerator only if both flags IOACC_READ and IOACC_WRITE have been specified. Flag IOACC_PERFILE_THREAD can further enhance performance when many simultaneous files are opened by the server(s) and they may reside on separate disk drives since RTFiles-32 can perform disk I/O on multiple disks in parallel. Applications that want to utilize the I/O Accelerator should call this function once at program initialization.
|