10.8. Expensive System Calls

This section contains a list of some of the potentially expensive system calls when performing network I/O. Here are the expensive system calls:

  • select(2)

  • poll(2)

As described earlier, select/poll should be avoided for large lists of file descriptors. Instead, the event port driver should be used (see the man page poll(7)). Using the event port driver is described in Section 13.5.2, “Event Port Driver” on page 428.

NFS:

  • open(2)

  • sync(2)

  • read(2) and write(2) due to accessing data across the network

The sync system call should be avoided when using NFS, as it will cause excessive network traffic to sync potentially dirty buffers.

Get HP-UX 11i Tuning and Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.