Adding Service to Open Source Software
Downloads Documentation Account Shopping Basket Checkout

Using ACE on Linux

ACE has been ported to many of the available Linux distributions and variants. Riverace supports ACE on Red Hat Linux (see the support page for the complete platform support matrix).

Most (if not all) of the tools you need are usually packaged with your Linux distribution. They may be on separate "developer"-type CDs, but they're generally there.

Using More Than 1024 Network Handles

The maximum number of handles that can be used with select() varies across platforms, but with Linux kernels, it's 1024 by default. For many applications, this is too low, reducing the scalability of applications using select()-based reactor implementations (ACE_Select_Reactor and ACE_TP_Reactor). When you need to increase the number of handles, follow these steps (this works for at least 2.4 kernels as reported by one customer... your mileage may vary):

  1. Change the value of __FD_SETSIZE to the maximum you want. This value should be changed in:
    • /usr/include/bits/typesizes.h
    • /usr/include/bits/nptl/typesizes.h
    • /usr/include/linux/posixtypes.h
  2. Rebuild the kernel.
  3. Rebuild ACE.
  4. Make sure that /proc/sys/fs/file-max (total number of files that can be opened by all users) is large enough. To check, you can: cat /proc/sys/fs/file-max
    If you need to increase it, modify /etc/sysctl.conf and add: fs.file-max = <some big number> and then execute sysctl -p. Most likely you will not have to make any changes here.
  5. Edit /etc/security/limits.conf and add: <user name> hard nofile <the handle limit you want> (no larger than the __FD_SETSIZE value from above).
  6. Login as user specified in previous step and execute ulimit -n 2048. At this point kernel will allow any process in current session to open 2048 handles. To check what are your limits you can always use ulimit -a. Since this setting will be valid only for this session, you can add ulimit -n 2048 to your .profile or .bash_profile if the permanent setting is required.
Home | About Us | Site Map | Privacy Policy | Contact Us | ©2005-2007 Riverace Corporation