Re: TCP/IP send, sendfile, RAW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the platform is a netsilicon NS9360 witch include an 100MBit ethernet device.
The driver came with the software(LxNETES) for the development board.
CPU load is 100% when running sender program.

cat /proc/interrupts; sleep 10; cat /proc/interrupts doen't work anymore because cpu is to busy.

Does sendto give other processes time when the hardware is transmitting data?
Is this bad hardware or is the cost of sendto that high.



From: Pádraig Brady <[email protected]>
To: Roy Rietveld <[email protected]>
Subject: Re: TCP/IP send, sendfile, RAW
Date: Fri, 05 May 2006 10:09:49 +0100

Roy Rietveld wrote:

> Can somebody help me with this.
>
> I'am new to Linux normaly i do programming for RTOS.
>
> I would like to send ethernet packets with 1400 bytes payload.
> I wrote a small program witch sends a buffer of 1400 bytes in a
> endless loop.
> The problem is that a would like 100Mbits throughtput but when i check
> this with ethereal.
> I only get 40 MBits. I tried sending with an UDP socket and RAW
> socket. I also tried sendfile.
> The RAW socket gives the best result till now 50 MBits throughtput.
>
> Is there something faster then send or am i doing something wrong.
>
> I'm running kernel 2.6 on a ARM9 core at 177Mhz 32RAM 32Flash.

Is this the platform for both sender and receiver?

What you have to consider is processing required per packet.
At 50Mb/s you are getting for following number of packets per second:

$ echo "(50*10^6)/8/(12+8+14+20+8+1400+4)" | bc
4263

I'm guessing that the receiver or sender is running out of CPU at this rate?
Also maybe this number of interrupts/s may be an issue on this platform?
You can check the interrupt rate easilty enough with:
cat /proc/interrupts; sleep 10; cat /proc/interrupts

Note by default ethereal (libpcap) will use 3 syscalls per packet
to copy and timestamp each packet. Have a look at PACKET_MMAP
to alleviate this.

At the interrupt level you could use NAPI or interrupt coalescing etc.
What driver are you using?

Pádraig.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux