Sponsored Content
Top Forums UNIX for Advanced & Expert Users Performance problem with bidirectional nc Post 302499629 by netdrx on Friday 25th of February 2011 12:24:59 AM
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...
 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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
SCC(4)							   BSD Kernel Interfaces Manual 						    SCC(4)

NAME
scc -- Zilog 8530 Serial Communications Controller interface SYNOPSIS
scc* at ioasic? offset ? DESCRIPTION
The scc driver provides support for the Zilog 8530 Serial Communications Controller (SCC) via the IOASIC found on DECstation 5000 models in the /100, /20, and /240 series (supported by NetBSD/pmax). Each SCC device has two serial ports. The DECstation 5000 model 20 provides one SCC device. Other models provide two, but one port of each device is dedicated to mouse and keyboard input, respectively. Input and output for each line may set to one of following baud rates: 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, or 57600. Speeds up to 230400 are supported by the chip and the motherboard, but speeds higher than 57600 do not work reliably without an external clock signal. FILES
/dev/ttya /dev/ttyb /dev/ttyc /dev/ttyd The mapping from units to serial-hardware outlets is idiosyncratic. The even ports are wired serial connectors and the odd-numbered ports are reserved for mouse and keyboard. On machines with one port like Personal DECstations, the single device is ttya. On the 5000/1xx and 5000/2xx, the first serial port (default serial console) is ttyc and the second port is ttya. SEE ALSO
intro(4), ioasic(4), ttys(5), MAKEDEV(8) HISTORY
The scc driver first appeared in 4.4BSD. The scc driver was also used for the IOASIC SCC found in DEC Alpha model 3000 TurboCHANNEL based systems; NetBSD/alpha has since been con- verted to use the machine-independent zstty(4). BUGS
The IOASIC provides internal DMA channels that can be programmed to transfer up to 4096 bytes of data into, or out, of an SCC without further software intervention. This feature of the IOASIC is not yet supported. The mapping from device-special files (major and minor number) to chip and port is arguably backwards. ULTRIX tries to hide the hardware mapping, but NetBSD does not. Users wanting to use ULTRIX compatible tty names /dev/tty0 and /dev/tty1 for the scc comm-port lines should make links or device-special files which match their hardware setup. BSD
April 24, 2003 BSD
All times are GMT -4. The time now is 04:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy