Performance problem with bidirectional nc


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Performance problem with bidirectional nc
# 1  
Old 02-25-2011
Performance problem with bidirectional nc

Working on a simple, half duplex network diagnostic that will run anywhere using nc and dd. Performance is symmetrical with sink and source nc processes open as a server:

Code:
nc -vkl 5000 > /dev/null &
cat /dev/zero | nc -vkl 5001 &

With this on the client:

Code:
nc host0 5001 | dd of=/dev/null count=10000
5119384 bytes (5.1 MB) copied, 0.037134 seconds, 138 MB/s

dd if=/dev/zero count=10000| nc host0 5000
5120000 bytes (5.1 MB) copied, 0.036661 seconds, 140 MB/s

When I try to make the connection bi-directional on the same port, the write performance degrades:

Code:
cat /dev/zero | nc -vkl 5000 >/dev/null &

nc host0 5000 | dd of=/dev/null count=10000
5098656 bytes (5.1 MB) copied, 0.036657 seconds, 139 MB/s

dd if=/dev/zero count=10000| nc host0 5000
5120000 bytes (5.1 MB) copied, 11.6311 seconds, 440 kB/s

I'd like the diagnostic to use a single port, if possible. Any insights or suggestions would be greatly appreciated.

Thanks,

Tom

Last edited by pludi; 02-25-2011 at 04:16 AM.. Reason: code tags, please...
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Performance problem in Shell Script

Hi, I am Shell script beginner. I wrote a shell programming that will take each line of a file1 and search for it in another file2 and give me the output of the lines that do not exist in the file2. I wrote it using do while nested loop but the problem here is its running for ever . Is there... (12 Replies)
Discussion started by: sakthisivi
12 Replies

2. Red Hat

Disk performance problem on login

Running CentOS 5.5: I've come across a relatively recent problem, where in the last 2 months or so, the root disk goes to 99% utilization for about 20 seconds when a user logs in. This occurs whether a user logs in locally or via ssh. I have tried using lsof to track down the process that is... (5 Replies)
Discussion started by: dangral
5 Replies

3. Linux

Help in monitoring performance problem in Linux

hello, i'm having some performance problem on one of my linux machines and i hope someone will be able to help me analyzing the problem. machine info: Linux fedora, cpu x 4 cores of 1.6Ghz, 8G memory, 8G swap. i've enabled sar on my machine and created a graph using ksar utility for... (15 Replies)
Discussion started by: levic
15 Replies

4. Emergency UNIX and Linux Support

VPN performance problem

This is a weird problem I've been butting my head against for days now... I have two OpenVPN servers set up with identical configurations except for the keys. One of them is hosted in a datacenter with a large backbone, the other is hosted on my home server's limited residential internet. One... (9 Replies)
Discussion started by: Corona688
9 Replies

5. UNIX for Dummies Questions & Answers

Network performance problem

I have a Teradata Machine, using MP-RAS Unix, with a 1000 Intel Ethernet card and a Cisco switch. If I configure the ethernet card and the switch to auto, so they negotiate to 1000, or configure the ethernet card and switch manually to 1000Full or 100Full, the velocity is very very low. Only... (2 Replies)
Discussion started by: cuatrodos
2 Replies

6. Solaris

Performance problem

Hi All, There is a virtual user "ecoouk" which logs on to the server and runs some scripts. I want to know how much server performance can I gain if I put off all the scripts run by this user. Please tell me how to analyse how much resources a specific user is using. Regards, Abhishek (3 Replies)
Discussion started by: max29583
3 Replies

7. UNIX for Advanced & Expert Users

AIX server performance problem!

Hello, I have a performance problem on an AIX box. I'm not sure what is causing this and hoping someone may have suggestions. Currently I'm noticing that cpu's are waiting while the box is in a idle state. I checked the disks and none of them are at 100%. If they were then I would understand... (3 Replies)
Discussion started by: ctcuser
3 Replies

8. UNIX for Advanced & Expert Users

performance problem

Hello, I have a mail server (sendmail) with SUNOS 5.5.1. Just recently it began to respond very slowly. I used vmstat to check the performance data. Only interupt, system call and CPU context swiching are relatively high. Other statistics are normal, especially CPU utilization are very... (5 Replies)
Discussion started by: caoai
5 Replies
Login or Register to Ask a Question