• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

nio maxing CPU usage  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This post is related to my other post, http://www.coderanch.com/t/277651/Streams/java/nio-download, but now I have a new problem.

The code below works, pulls down a file, rips out the http response, and closes the channels properly.

HOWEVER, my cpu usage is 100% max while the code runs. This code is also in a thread spawned by a download manager. I have an AMD64 3700 with a gig of ram and running jdk1.5_05, so I don't think processing power is the issue.

This can't be normal, or is it? Any tips or insight into why this is happening?


 
author and iconoclast
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
100% CPU usage is a good thing. It means that something is happening as fast as possible, without needing to wait for disk or RAM or network or video or mouse or keyboard. If you search the "Performance" forum for the phrase "100% CPU Usage" you'll probably find this discussed a dozen times.
 
Samuel Mendenhall
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why then, when I download the same file through firefox or ie, does the CPU usage not max out?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!