LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-12-2010, 02:51 AM   #1
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Rep: Reputation: 30
high CPU usage for 100Mbit/s transfer


Greetings

I'm diagnosing why my application is slow and I found the problem by writing a simple TCP client/server, where each side sends/receives 64k at a time.

The bottleneck is on the receiving end, which uses has a Realtek 8139 100Mbit/s NIC and running Windows 7. I'm able to get 11.9 MiB/s as expected, but the CPU usage is very high - 80% on 0th CPU and ~20% on 1st CPU. Task manager shows conhost.exe taking 25% CPU and 10% for my program.

When I try the same receiving program on Debian, I can still get 11.9 MiB/s, but the CPU usage is now only 1% (user & system).

On the sending side, the CPU usage is practically 0% in both Windows 7 and Debian.

I tried changing the TCP receive/send buffer sizes and disabled internet connection sharing (does extra packet processing?) on the receiving end, but it doesn't help.

Any ideas?
 
Old 07-12-2010, 03:15 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,256

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
I've seen this with video cards. Something looks like it's being simulated in software, or done very inefficiently.
 
Old 07-13-2010, 03:18 AM   #3
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Original Poster
Rep: Reputation: 30
OK, solved. The high CPU was due to doing 150 printf() /second. This was suggested by the large CPU usage by conhost.exe (handles console applications?)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU usage too high! rock.k Linux - Newbie 4 03-01-2008 04:48 AM
High CPU usage ?! Why? skate Linux - Software 1 04-11-2007 05:55 AM
High Cpu usage untak Debian 21 01-23-2007 06:21 AM
High CPU usage from udev Crushing Belial Slackware 1 01-09-2007 06:10 PM
cpu usage high corbintechboy VectorLinux 2 07-27-2005 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration