- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Increasing file descriptors (FD_SETSIZE)
Operating System - Linux
1753775
Members
7427
Online
108799
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 07:32 PM
09-19-2007 07:32 PM
Increasing file descriptors (FD_SETSIZE)
Dear Experts,
I'm having a big issue when trying to increase the FD_SETSIZE default value 1024 to 4096.
I have installed kernel-headers from yum. and I change the value in /usr/include/linux/posix_types.h and add value to the /usr/include/linux/types.h
#define __FD_SETSIZE 1024
to
#define __FD_SETSIZE 4096
Then download the glibc-2.6-3.src.rpm and compiled with #rpmbuild --rebuild and it has successfully generated all glibc-<>.rpms.
I have tried to remove the existing glibc pkgs to installed compiled rpm files. This is the stupid installation work I ever done - after removing glibc with --nodeps. I have no way to run almost any commands in the box; even never boot-up.
So I re-installed the OS with --force from my compiled rpms and it got installed (assuming over-write existing binary files).
Now I need to compile and install gcc too; from src.rpm. This is throwing an error and I'm frustrated
otypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include ../../gcc/errors.c -o errors.o
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
stage1/xgcc -Bstage1/ -B/usr/i386-redhat-linux/bin/ -c -O2 -g -march=i386 -mcpu=i686 -fprofile-generate -gnatpg -gnata -I- -I. -Iada -I../../gcc/ada ../../gcc/ada/ada.ads -o ada/ada.o
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
gnat1: error: unrecognized command line option "-mcpu=i686"
make[2]: *** [ada/ada.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/usr/src/redhat/BUILD/gcc-4.1.2-20070503/obj-i386-redhat-linux/gcc'
make[1]: *** [stageprofile_build] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/gcc-4.1.2-20070503/obj-i386-redhat-linux/gcc'
make: *** [profiledbootstrap] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.27994 (%build)
What I forced to recompile glibc and gcc is, get the new value from the posix_tyes.h file and types.h file, and build those rpms.
This requirement is requested by my developers - They need more than 1024 connections (msockets). The moment max. clients that connect to the server is around 1006 but they wanted me to push the Linux box to more than 4096 connections..
My environment is Fedora 7. if this is work I will move to rhel5.
Please let me know and is there a way that we could increase the file descriptors (FD_SETSIZE) on Linux. On windows and sun-solaris - this is working more than 4096 connections.
your advice is really really appreciated..
Thanks in advance
-+> Hirantha
I'm having a big issue when trying to increase the FD_SETSIZE default value 1024 to 4096.
I have installed kernel-headers from yum. and I change the value in /usr/include/linux/posix_types.h and add value to the /usr/include/linux/types.h
#define __FD_SETSIZE 1024
to
#define __FD_SETSIZE 4096
Then download the glibc-2.6-3.src.rpm and compiled with #rpmbuild --rebuild and it has successfully generated all glibc-<>.rpms.
I have tried to remove the existing glibc pkgs to installed compiled rpm files. This is the stupid installation work I ever done - after removing glibc with --nodeps. I have no way to run almost any commands in the box; even never boot-up.
So I re-installed the OS with --force from my compiled rpms and it got installed (assuming over-write existing binary files).
Now I need to compile and install gcc too; from src.rpm. This is throwing an error and I'm frustrated
otypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include ../../gcc/errors.c -o errors.o
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
stage1/xgcc -Bstage1/ -B/usr/i386-redhat-linux/bin/ -c -O2 -g -march=i386 -mcpu=i686 -fprofile-generate -gnatpg -gnata -I- -I. -Iada -I../../gcc/ada ../../gcc/ada/ada.ads -o ada/ada.o
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
gnat1: error: unrecognized command line option "-mcpu=i686"
make[2]: *** [ada/ada.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/usr/src/redhat/BUILD/gcc-4.1.2-20070503/obj-i386-redhat-linux/gcc'
make[1]: *** [stageprofile_build] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/gcc-4.1.2-20070503/obj-i386-redhat-linux/gcc'
make: *** [profiledbootstrap] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.27994 (%build)
What I forced to recompile glibc and gcc is, get the new value from the posix_tyes.h file and types.h file, and build those rpms.
This requirement is requested by my developers - They need more than 1024 connections (msockets). The moment max. clients that connect to the server is around 1006 but they wanted me to push the Linux box to more than 4096 connections..
My environment is Fedora 7. if this is work I will move to rhel5.
Please let me know and is there a way that we could increase the file descriptors (FD_SETSIZE) on Linux. On windows and sun-solaris - this is working more than 4096 connections.
your advice is really really appreciated..
Thanks in advance
-+> Hirantha
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 08:31 PM
09-19-2007 08:31 PM
Re: Increasing file descriptors (FD_SETSIZE)
Your developers might want to use poll() instead of select(). Both perform a similar task, but some sources say poll() might be more efficient. In addition, the arguments of poll() won't suffer from the FD_SETSIZE limit, which seems to be the main problem.
A quick Googling found me this message from the Linux-Kernel mailing list:
http://www.uwsg.indiana.edu/hypermail/linux/kernel/0104.1/0226.html
MK
A quick Googling found me this message from the Linux-Kernel mailing list:
http://www.uwsg.indiana.edu/hypermail/linux/kernel/0104.1/0226.html
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP