[Ilugc] Performance Tuning

  • From: rameshd82@xxxxxxxxx (Ramesh D)
  • Date: Sun Jan 14 11:26:09 2007

If you want to take full advantage of the multiprocesor systems then your
application should be multithreaded. Converting a single threaded software
to multi threaded has its own complexities and can turm out to be a night
mare, if concurrent accessing is not taken care off.
If you can convert your application into a multi-threaded one or if it is
already a multi-threaded one then i would suggest the following tools:
1. Intel Compiler (ICC)
2. Intel thread checker that detect syncronization problems with threads and
finally
3. Intel thread profiler. This is a profile for threads and is quite helpful
if you want to see the amount of time the thread is spending in the locks
(critical region).

Moreover since you application is based on socket, try optimising the
sockets.
1. Use a large receive and transmit buffer size (use socketopts for this).
2. Try different ways such as (poll, select, non-blocking etc). Each has
their own limitations and advantages. Refer to the book. Unix Network
Programming . volume 1 by R. Stevens.

Moreover using VTUNE (Intel Profiler) gives you details about where your
application is spending more time (called as hotspots). I think gprof can do
this as well.

You can also do a bit of tuning in the NIC driver. If your packet sizes are
huge you can switch on jumbo frame support. This also works out to be good.

Finally what is the type of your network card. Check if your NIC driver
supports NAPI instead of interrupts. Using NAPI can have lots of advantage
and reduces the load on the processor at high data rates.

Try the above and let me know about it.

Finally a link that talks about the optimising network servers for large
traffic.

http://www.kegel.com/c10k.html

Ramesh
Aricent Chennai.

On 1/13/07, krishna chaitanya arava <krish.arava@xxxxxxxxx> wrote:


If you are using intel based machine to run your aplication then use Intel
compiler
for performace tuning instead of GCC.

Intel compiler has advanced optimization options that you can use.
Just google for intel compiler . I have seen number of examples for
compiling like mysql.

On 1/13/07, hari <rhariharan@xxxxxxxxx> wrote:

Hi,

I need some help/suggestions on how to improve the performance of an
application.
Any suggestions, links etc., will be most helpful.

This is a C++ application. It reads input data over a socket, processes
it
and writes output to files (pcaps).
I know this is not much info, but this is the crux of it, the simple
bare
bones version.

It works fine;
The problem is, it is currently taking input at about 20mbps of data per
sec; but the clients on their testing want this to be about 80.
This is because my appln is the last in the line. It is slowing down the
upstream components.
So i need to identify bottlenecks etc.,

How helpful will gprof be in providing quick info?
I tried to use this once with my app, but the huge amt of info made life
difficult.

The appln will probably run on multiproc servers(At least at the
client).
So
is there a way to use this feature without too much redesigning?
I do not know much about programming with multiple processors in mind.

Thanks
hari
_______________________________________________
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

_______________________________________________
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Other related posts: