- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Why would this program take at times more than...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Discussion Boards
Community
Resources
Forums
Blogs
- 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
02-12-2002 08:09 AM
02-12-2002 08:09 AM
Why would this program take at times more than 20 sec??
In the attached program am creating threads and accessing my local web server. Initially I was fetching the content, but now am just opening a connection and closing it.
And when I have 200 threads doing the same operation for 100 times, at times opening the socket takes more than 20 seconds.
I have also tried the same with multiple process. 17 process each having 10 threads. Even when I have multiple processes I was facing the same error.
I have increased tcp_conn_request_max till 4096. But of no help. I have also tried source quench param.
I am working on HP 11 on L2000 series.
But this thing is working fine on my Win 2000 !!!
Can somebody help me ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2002 08:39 AM
02-12-2002 08:39 AM
Re: Why would this program take at times more than 20 sec??
You can tune this timeout somewhat with NDD.
tcp_time_wait_interval
Also check your nslookup and make sure you are reading the address from /etc/hosts instead of asking a DNS for the address.
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2002 06:37 PM
02-12-2002 06:37 PM
Re: Why would this program take at times more than 20 sec??
TIME_WAIT is there as part of TCP's mechanisms to protect against silent data corruption.
better still is to have the application make explicit calls to bind() with port numbers in the range of 5000 to 65535, assuming the language in which the program is coded provides access to bind() and selecting port numbers. this is what SPECweb96 and SPECweb99 load generators do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2002 08:20 PM
02-12-2002 08:20 PM
Re: Why would this program take at times more than 20 sec??
If the same thing is working with Windows NT it should work in HP.
So, I think the problem may be related to your web server. If you are running apache, pl. attach httpd.conf , if u are using older version, pl. also attch srm.conf.
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 05:52 AM
02-13-2002 05:52 AM
Re: Why would this program take at times more than 20 sec??
Again, as I replied in your post subject of (something like) "Multiple Threads in JVM using Sockets", I would say you need to adjust your kernel parameters. I refer you to the same page:
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/configuration.html
There you will see that the minimum and default value for the maximum number of threads per process on HP-UX 11 is only 64. Given that you say you have tried running this program with a parameter of 200 for the number of threads, I'm surprised you didn't see a hard error like "Out of Memory" from the JVM.
Try setting those kernel parameters to something more reasonable for your usage and see if that helps. And of course, make sure to keep a backup your current kernel and kernel configuration in /stand before trying this.
Regards,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 09:28 AM
02-13-2002 09:28 AM
Re: Why would this program take at times more than 20 sec??
possible remedy is to increase the parameter apache passes for the backlog in the listen() call, and make sure that tcp_conn_request_max is at least that large. i say possible, because if the _sustained_ connection request rate is greater than apache can sustain, any queue, no matter how large, will overflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2002 07:31 PM
02-13-2002 07:31 PM
Re: Why would this program take at times more than 20 sec??
Thanks for all your suggestions. Now that I have lot of options to explore I would do the same and post the results.
Regards,
M Meenakshi Sundaram.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2002 09:03 PM
03-07-2002 09:03 PM
Re: Why would this program take at times more than 20 sec??
I have tried the options. But still at times it is taking more time to open socket. Should I look at tuning tcphashsz param. As Rick has pointed out this would be needed in case of request rates more than 100/200. Also how do I find the current value. The /stand/system doesnt have this param.
Regards,
M Meenakshi Sundaram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2002 10:03 PM
03-07-2002 10:03 PM
Re: Why would this program take at times more than 20 sec??
Try this:
# kmtune -l
or
Look for the value in /var/sam/boot.config
or
Look for the value in /usr/conf/master.d/core-hpux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 02:54 PM
03-11-2002 02:54 PM
Re: Why would this program take at times more than 20 sec??
also, something in this space that "works" on NT may not work on Unix - NT apps/stack often use an abortive (really bad idea) close of sockets by default, which short-circuits the TIME_WAIT state. doubleplusungood.
this is java right? perhaps your remaining (few?) log connect times are coincident with java garbage collection?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2002 12:18 PM
03-22-2002 12:18 PM
Re: Why would this program take at times more than 20 sec??
Here is what the process does:
- gets a port # (e.g. 646)
- binds to the port (no addr in use error)
- calls connect. This request succeeds and the connection is established. The connection is to another process on the local system via inetd.
- close connection
- connecton goes into TIME_WAIT as shown by the netstat -a cmd
tcp 0 0 blaze.bpxx blaze.646 TIME_WAIT
- ....
- the above sequence is repeated. This time if the same port is used i.e. 646 and the previous connection is in TIME_WAIT, the connect hangs and times out after a minute or so. The errno is 238 (ETIMEDOUT).
During this time the netstat -a shows
tcp 0 0 blaze.bpxx blaze.646 TIME_WAIT
tcp 0 1 blaze.646 blaze.bpxx SYN_SENT
- if we retry connect w/ a diff port #, the connect succeeds.
- if the connect is issued for port # 646 (e.g.) and there is no previous connection for port# 646 in TIME_WAIT, the connect succeeds.
We had started inted w/ -l option. The logs msgs in syslog did not show any connect request implying that the connect that timed out never made it to inetd.
I think there is a problem in the transport layer in dealing w/ a new connection w/ the same source and destination address as a previous connection in TIME_WAIT.
This is a solid failure. We are running HP_UX B.11.00 on 9000/800 machine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2002 12:38 PM
03-22-2002 12:38 PM
Re: Why would this program take at times more than 20 sec??
there are conditions whereby a connection in TIME_WAIT can indeed transition directly to ESTABLISHED, but in this day of people insisting on increasingly random initial sequence numbers that is becomming increasingly unlikely (not that it was very likely before)