User`s guide
Developing LUC Applications [5]
// If no valid options were given, print the program usage message.
fprintf(stderr,"Usage: exluc -c id | -s\n");
fprintf(stderr,"-c id Run as a client with the given endpoint id.\n");
fprintf(stderr,"-s Run as a server, printing the endpoint id.\n");
return 1;
}
5.6 Fast I/O Memory Usage
The MTK Fast I/O Library performs all data transfer operations through nearby
memory. Nearby memory is memory on the same node as the Threadstorm processor
where the LUC endpoint was started. The library transfers user data into and out of
nearby memory buffers automatically. Use configuration variables to control the
amount of nearby memory used by the library.
The MTK Fast I/O Library uses one or two regions of nearby memory for each local
endpoint as I/O buffers. The library requires one region for all small allocations and
allows for an optional region for large allocations. The small region is used for core
RPC data structures that are sent over the high speed network. Small data transfer
buffers may use the small region as well. The optional large memory region is used
for large transfer requests and many concurrent smaller requests. The large region
may be sized to support one very large RPC request or several smaller requests.
To control the size of the small memory region use the configuration variable
LUC_CONFIG_MAX_SMALL_NEARMEM_SIZE. Legal values range from 1 MB
(1,048,576) to 256 MB (268,435,456), inclusive, in power-of-two increments. The
size of the largest allowable request on this memory region may be specified with the
LUC_CONFIG_MAX_SMALL_MEM_REQUEST variable. Legal values range from
64 KB (65,536) to one half of the current small memory region size, inclusive, in
power-of-two increments.
To control the size of the large memory region use the configuration variable
LUC_CONFIG_MAX_LARGE_NEARMEM_SIZE. Legal values range from 1 MB
(1,048,576) to 2 GB (2,147,483,648), inclusive, in power-of-two increments. While
the library allows for a very large nearby memory region, the system may not be
configured with enough nearby memory to support a maximum size nearby memory
region. The size of the largest allowable request on this memory region may be
specified with the LUC_CONFIG_MAX_LARGE_MEM_REQUEST variable. Legal
values range from 1 MB (1,048,576) to the current large memory region size or 256
MB, whichever is less. The maximum request size must be an integral power-of-two.
To disable the large memory region specify a requested size of zero.
S–2479–20 65