Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a tcp server setup using inetd on aix 5.3.

Problem is the responses come very very slowly from the server.But if I have a standalone deamon server , its very fast. But my requirement is that i have to use inetd.

So,Is there anyway to improve the performance of inetd.


share|improve this question

migrated from Oct 26 '09 at 8:35

This question came from our site for professional and enthusiast programmers.

One of the problems when running through inetd is that it's going to introduce overhead in the performance. If performance is a concern, which it is, do not use inetd and use a standalone daemon.

share|improve this answer

The best way to improve performance would be to take inetd out of the picture. But if you really, really have to use inetd, here are some ideas:

  1. Renice inetd to a negative priority.
  2. Turn down / off inetd logging
  3. Log to a faster disc / raid.

Another possibility is that your service is processing one request or a small number of requests, and then shutting down. If that's the case, then under load inetd will consume a lot of time relaunching your service. So you want to avoid that scenario.

A final possibility is that problem you are seeing is caused by server processes not terminating correctly, and hanging around using up kernel resources. In the worst case, they may be even spinning. It would be worth using your system's monitoring tools to see what is actually happening when your system is running slowly.

share|improve this answer

Can you give us some idea of the difference between "very very slowly" and "very fast"? It could be that inetd is doing something like doing a reverse lookup of IP addresses on each connection (I don't know for sure, this is just a guess) and maybe you don't have a DNS server set up to answer, so it's getting a 1 or 2 minute timeout on each connection.

If the difference is "10 per second" vs. "12 per second", then you will have different issues than if the difference is "takes 90 seconds to respond" vs. "responds right away".

share|improve this answer
+1 For performance tuning measure first. – sleske Oct 26 '09 at 9:19

It sounds like your TCP service is being started for each request incoming to inetd, then shutting down immediately.

Forking a new process like this for every request is pretty slow, so I think the best place to look is changing your TCP service to stay alive to handle x number of requests before shutting down.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.