TCP connect consumes 80% of CPU load

Hello!
I've done some profiling on a Java application and i see that 80% of the time the application has on the CPU is used for establishing a TCP connection.
  Socket c;
  c.connect("",xxxx);The application performes several hundreds of connect per minute, but most of them take about 5 sec or less, but som uses the CPU for more than 130 seconds!!
Could, i suspect it too be a problem with the network card beeing overloaded and will try wit multiple NIC's. But does anybody have any experience with this??? and maybe point out some improvements.

Hello!
Should have mentioned it.. we are using a
ThreadPoolExecutor with 1000 threads in the core. But
shall look into that. thanx :-)
There may be some improvements that can be done in
that areaThis doesn't have anything to do with what I am talking about. I am talking about a pool of open connections (sockets) not a pool of working threads.
Here is the thing when you (in a program) tell a socket to close the OS gets told that the socket is no longer in use and should be closed. The OS then closes the socket but doesn't actually release the allocated resources until it feels like it. It feels like it when it (a) has some spare time with nothing else to do or (b) it has to reclaim the resources because something else needs them.
In short the OS final clean up of socket resources is rather akin to garbage collection by the JVM... it will happen but not neccessarily right away and you really can't do anything about that.
Let me make this 100% clear. This is NOT a Java problem. This is an OS "problem". Although it's not really a problem either. Under most sensible scenarios that model works just fine... your problem is that you are doing something foolish.
Creating and disposing of sockets is an intensive task for the OS. The queue of sockets waiting to be finally disposed of by the OS grows and grows while it is busy creating new sockets for you until eventually it HAS to clean up in order to give you a new socket. Then you pay a big penalty in time while the OS does it's garbage collection.
So in summary as it goes this situation is insolvable. What you need to do is not be creating and destroying hundreds of sockets every second. How can you do this? By using a pool of already open sockets that are shared among your various threads.

Similar Messages

  • High CPU load in audio conference application

    Hi Java Guys and Java Girls.
    We are developing an audio conferencing application that is based on the AVTransmit and AVReceive examples, from the JMF 'code samples' page: http://java.sun.com/products/java-media/jmf/2.1.1/solutions/AVTransmit.html
    The main change that we made to the examples was to spilt the application in to two threads, one which receives and one which transmits, in order to use the duplexing capabilities of our shiny new (and expensive :-) sound cards - M-Audio Delta 44.
    Our problem is one of performance. Even when only one of the channels is working, we get a lag of somewhere around 1 second. When both channels are connected and running, the CPU load jumps up to 100%, and the streaming breaks down in both directions. With only one of the 2 channels open the CPU load is only about 1% - below the tolerance of the measurement.
    Interestingly enough, we tried running the UI Example as well, using 2 different TCP ports to get duplexing running between the 2 computers, and we encountered the same problem.
    We've been bashing away at this problem for weeks now, and we have tried all sorts of things, but now we are rapidly reaching the edge of sanity. We really need to get this to work, with lag times below 0.25 seconds, and without taxing the CPUs too much.
    We would be extremely grateful if you could look at the code that we are pasting below, and let us know if you can see what we are doing wrong.
    Thanks very much for your help.
    Yours,
    Adam Crowther
    Martin Piwowarski
    PS We are using 2 Athlon 2.0+ Systems, each with 512MB of RAM, running Windows XP Pro, and streaming over a 100MBPs Ethernet LAN, using the on-board LAN adapters.
    PPS We put the code here:
    http://www.adamcc.ch/jmf/

    The problem is not your code, but the stock JMF DirectSound audio renderer.
    The audio renderer has its DirectAudio buffer hard-coded to hold 2 seconds of sound. Therefore, if you have any lag for any reason from the audio card driver when sound is starting up, you will have an audio delay of up to two seconds.
    My company had to make heavy modifications to the original JMF audio renderer. We set up a 300 millisecond buffer and also introduced code to handle buffer starvation, etc., etc. I would suggest you get the JMF source code and check this out for yourself.
    Good luck.

  • Permanent high CPU load and timeouts in communication channels

    Dear Colleagues,
    we've a strange issue since last week. At first we had an problem with a redirect to the cytrix online booking engine within the travel management application of our SAP NW Portal. There is a redirect.jsp file deployed in our PI system that connects to cytrix and passes the URL with session link and session cookie to our Portal. We fixed that issue by restarting the PI system.
    We have a PI 7.0 stack 23 on HP-UX.
    After restarting we found that we've got a very high CPU load (about 75% overall CPU, or 300% at 4 CPUs) probably caused by very frequent (3 per second) minor garbage collection runs (as seen in GC.log).
    On friday we had timeouts within one of our communication channels in the PI system.
    We changed the heap size from 2GB to 3GB and the new generation from 341MB to 768MB and restarted the PI system. But after a few ours the system uses 75% RAM of the CPU high CPU load and the GC runs are still the same.
    This is a short excerpt of our GC.log:
    52645.608: [GC 52645.608: [DefNew: 395326K->2003K(589824K), 0.0334788 secs] 1628688K->1235472K(2949120K), 0.0335882 secs]
    52646.071: [GC 52646.072: [DefNew: 395219K->2072K(589824K), 0.0351584 secs] 1628688K->1235680K(2949120K), 0.0353002 secs]
    52646.665: [GC 52646.665: [DefNew: 395288K->2173K(589824K), 0.0371023 secs] 1628896K->1236058K(2949120K), 0.0372198 secs]
    52647.022: [GC 52647.022: [DefNew: 395389K->1969K(589824K), 0.0352723 secs] 1629274K->1235991K(2949120K), 0.0353865 secs]
    52647.368: [GC 52647.368: [DefNew: 395185K->1885K(589824K), 0.0346132 secs] 1629207K->1235944K(2949120K), 0.0347310 secs]
    52647.804: [GC 52647.804: [DefNew: 395101K->2069K(589824K), 0.0357804 secs] 1629160K->1236129K(2949120K), 0.0358980 secs]
    52648.327: [GC 52648.328: [DefNew: 395285K->2285K(589824K), 0.0380093 secs] 1629345K->1236369K(2949120K), 0.0381374 secs]
    52648.737: [GC 52648.738: [DefNew: 395501K->2282K(589824K), 0.0365516 secs] 1629585K->1236400K(2949120K), 0.0366749 secs]
    52649.125: [GC 52649.125: [DefNew: 395498K->2435K(589824K), 0.0352310 secs] 1629616K->1236589K(2949120K), 0.0353407 secs]
    52649.462: [GC 52649.462: [DefNew: 395651K->2436K(589824K), 0.0361161 secs] 1629805K->1236654K(2949120K), 0.0362322 secs]
    52649.840: [GC 52649.840: [DefNew: 395652K->2322K(589824K), 0.0341640 secs] 1629870K->1236539K(2949120K), 0.0342721 secs]
    Does anyone know what can cause the high load?
    Is the frequency of the GC runs normal?
    Can the timeouts be connected to the high CPU load?
    The error ony occurs on our productive system.
    I'd appriciate your help very much.
    Kind regards,
    Paul

    hi Paul,
    I believe an issue like that needs to be done onsite and not via a forum
    as it probably requires doing lots of checks/tests
    my suggestion would be to get a PI consultant expert with basis experience onsite or do it via OSS with SAP
    Regards,
    Michal Krawczyk

  • How to limit the number of TCP connections beeing used concurrently while a page is beeing loaded?

    We manufacture industrial small-footprint control modules with embedded web server. The resources of these modules are very limited, especially in RAM. We have problem, that FF opens 15 parallel TCP connections while loading a web page (main html page first, then all icons simultaneously). We can not handle such behavior because of lack of RAM memory needed for TCP buffers.
    Question is how to limit the number of concurrent TCP connections the browser will use? We need to do it somehow directly from the page, we can not push our customers to change the general settings of their browsers (they would not understand such things anyway).
    Do anyone have any suggestion?

    Sorry, one other thought. Many web designers now combine all icons into a single image and use CSS to clip the image so that only the desired portion is displayed. This minimizes the number of required connections and increases the probability that the image can be retrieved from cache.
    More info:
    * [http://www.w3schools.com/css/css_image_sprites.asp CSS Image Sprites - W3Schools]
    * [http://www.alistapart.com/articles/sprites/ A List Apart: Articles: CSS Sprites: Image Slicing’s Kiss of Death]
    * [http://coding.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/ The Mystery Of CSS Sprites: Techniques, Tools And Tutorials | Smashing Coding]
    No idea whether this is practical for your application.

  • High CPU load kills ethernet connection

    Short spikes in CPU load (MenuMeters installed) are constantly killing my internet connection.
    I use an ethernet connection with a cable modem (Motorola SB 4200 E) and have a MB 2 CD, 2 GB of RAM and OS X 10.4.9.
    After the ethernet connection is killed, only a complete re-start can fix the problem (and today alone I had to do something like 15 of them already).
    These sudden spikes in CPU load can be caused by all different kinds of activity, e.g.
    1.) playing back video files which my machine has problems dealing with (like .mkv files),
    2.) playing back 'regular' .avi files,
    3.) browsing the net (Camino, Safari, Opera, Firefox) and displaying flash content (just watching something on youtube creates a CPU load which kills the connection regularly),
    4.) any kind of activity which asks a high CPU load in general.
    It seems that the problem is caused by the CPU load in general, not by any particular application which causes the high workload.
    What I have tried:
    1.) PRAM reset
    2.) Apple Hardware Test (extended, loop)
    3.) de-installed Flash player
    4.) created a new user (admin)
    5.) made a clean 10.4.11 install on an external USB drive and booted from there
    6.) used Airport instead of the ethernet/cable modem
    7.) checked system temperatures (which are ok)
    8.) changed/exchanged/checked the RAM
    9.) made enough free disk space on my HD (15 GB)
    10.) repaired disk permissions
    but to no avail.
    Any help would be very much appreciated (since I'm ready to get a MS machine and wave my Mac good bye).
    Kind regards
    FC

    Hi Fred, and a warm welcome to the forums!
    What Firmware cersion is it?
    http://www.dslreports.com/forum/remark,5221851
    Mac Modem problems with Broadcom Chipset...
    All Linksys Cable Modems
    All Motorola Cable Modems except for the SB5120
    All Scientific Atlanta Cable Modems
    http://discussions.apple.com/thread.jspa?messageID=2985422&#2985422
    t seems that the problem is caused by the CPU load in general, not by any particular application which causes the high workload.
    Do you have Activity Monitor set to Show All Processes?

  • 100% CPU load but no clue in thread dump, EP. Win a bottle of champagne...

    Hi,
    We are suddenly facing 100% CPU load in our EP cluster (5 x 8-way Xeon multiprocessor machines). We have a serious performance problem that is burning a lot of our time and causes a lot of stress for over 3 weeks now.
    We have taken tens of thread dumps from Application Nodes.
    - In none of the thread dumps we see the Finalizer thread
    running.
    - From the garbage collector log we see that full garbage
    collection runs occur very rarily (once an hour).
    - We use the compacting garbage collector.
    - In a lot of thread dumps we do not even see our own portal code in the stack traces of the threads!
    - In Windows Task Manager we see the jlaunch.exe processes
    consume all available CPU time.
    - Portal users see a blank portal page when the CPU load hits 100%. When the load goes down again, things return to normal.
    - There are no errors logged in any of the log files of the portal. We checked all of them. We expected a log full of errors somewhere but nothing even remotely interesting was found. Windows Event Viewer shows nothing either.
    - The amount of sockets in CLOSE_WAIT status is < 10 on every machine in the cluster.
    This forces me to conclude that something in the jlaunch.exe executable consumes the CPU time. This raises the following 3 questions:
    - What does the mystifying jlaunch.exe do besides executing java.exe ?
    - Why is the Java virtual machine launched by a custom executable like jlaunch (What is it that cannot be program med in Java) ? Can it be GZip compression ?
    - If the problem is not caused by jlaunch.exe, then it must be caused by the JVM. What activity, invisible in thread dumps, is performed by the JVM that can cause the high CPU load ?
    Our development- and support teams are desperate. All suggestions are welcome. The person that comes up with
    the solution to our problem gets a nice bottle of champagne.
    Regards,
    Chris Twigt

    Hi,
    - What does the mystifying jlaunch.exe do besides executing java.exe ?
    This is so that the startupframework can connect more easily and take control of the JVM in some situations
    - Why is the Java virtual machine launched by a custom executable like jlaunch (What is it that cannot be program med in Java) ?
    I assume when SAP release their JVM (in the next major release), that will be called directly.
    - If the problem is not caused by jlaunch.exe, then it must be caused by the JVM. What activity, invisible in thread dumps, is performed by the JVM that can cause the high CPU load ?
    Loads of thing, but there should be clues in the thread dumps.  (the reason why your code is not in those thread dumps is that your code is only active during the processing of a particular request, unless you have a service, afterwards there are no trace of it as the thread which does the processing goes back to sleep)
    I've experienced a similar situation with a an 6.40 portal, and it was then caused by the following:
    1. User A comes logs in and sees that some cache timeout has occured , therefore it issues a SQL query which does a full table scan on a table of approx. 1 GB (on of the UME tables)
    2. User B comes in just afterwards and also sees that the cache timeout has occured, and issues the same SQL query as User A
    3. User C .... and so on untill the query from User A eventually finishes
    So
    1. Check database. Any big queries running ?
    2. Check file activity, are there a lot of writing ?
    3. Check network activity, especially to the state controller which is the weakest link
    4. What about portal logs ? Any activity during the hang ?
    Also, please provide one of the thread dumps for further analysis..
    cheers
    Dagfinn

  • Anyone else having an issue with TCP connections using iCloud for Windows?

    Hi,
    Before I asked this question, I did wait to see if any related questions came up, but none did, so I submit it now.
    On my admittedly older laptop running Windows 7 64b Home, I've run into difficulties with the iCloud for Windows app to the extent that I had to uninstall it.
    It would that, as my laptop was running, in the background, iCloudServices.exe would endlessly iterate TCP connections, which, while not actively sending or receiving any data, after some hours would number over 100 instances, taking up resources, and grinding my laptop's WiFi connection to a grindingly slow pace. I ended up, within the app, turning off everything, iCloud Drive and Photos, (I never used bookmarks), but still this would continue to occur.
    I contacted Apple Support, explaining what was going on, and they stated they only dealt with IOS and gave me a Microsoft Support number. When I called Microsoft support, I came more and more to the realization that the issue was specifically with the iCloud for Windows app, as that was the only software that was endlessly creating and not closing TCP connections as it was. How was Microsoft supposed to solve an issue with Apple code?
    So I called Apple back, whereupon they insisted it was a Microsoft issue. I explained other cloud services installed on the same computer were not having the same issue, it was unique to ICloudServices.exe. They stated they only dealt with IOS. I stated I purchased an iPad Air less than 7 months ago, and was trying to run iCloud in support of that.  They again stated they only dealt with IOS, and suggested I again try Microsoft. I asked them if it was reasonable to expect Microsoft to solve issues with Apple code? They said regardless, there was zero support offered for anything having to do with Windows, and all I could do was uninstall the app, which I did, though that did not feel very satisfactory to me. My thinking is, if Apple writes a Windows app in support of their hardware, they should offer support for it.
    Anyway, I was just wondering, is this an issue unique to me? or have others experienced a similar issue? I found this issue by opening the Windows Resource Monitor, looking under the Networking tab, and scrolling through the TCP Connections section to find 100+ concurrent iCloudServices.exe instances listed, whereas even Chrome, with multiple tabs and extensions, topped out at around 20.
    My one month old Desktop, DYI, sports a solid Asus 1150 MoBo, i7-4790k cpu, 16GB Ram, and an EVGA GTX 970 video card. I list some specs only to illustrate this computer has no hardware issues in comparison to my long in tooth laptop. On this desktop, running Win 8.1 Pro 64b,  at least as many, identifiably Apple, background service TCP connections are created even compared to Chrome, regardless of many tabs being open, many extensions, and even some related apps. Adobe does not even come close, though I run the full CC subscription. On this new computer, running Windows 8.1 Pro 64b, there are currently over 50 TCP connections and loopbacks that do not identify themselves, with just a - for the Image, and PID. With the experience on my laptop, I wonder how many of these are generated by Apple software, if not specifically iCloud software?
    The frustrating aspect of these connections is they seem in no way active, While the Chrome and Adobe connections can be seen to be transferring data, as long as I am not running iTunes, or so have my iPad actually plugged in, it seems 99% of the time these iCloudServices.exe connections are just taking up ports, neither sending nor receiving any data discernable to me under the Processes with Network Activity, or Network Activity lists, both displayed in the same window as the TCP Connections in the Windows Resource Monitor.
    Though I am fairly ignorant as regards coding, it seems as if there is no call to close a connection, very specifically, iCloudServices.exe, when it is no longer needed, and the next time a connection is needed, a new one is opened, rather than accessing the one previously opened. The only other reason I could imagine this might be occurring is if my Norton Internet Security software might mask and/or block the port after a certain time of inactivity.
    Anyone out there have any ideas or advice about this? Thanks in advance.

    Thanks jared,
    I'm still dealing with this issue through Apple. Some time after I posted this, I contacted Apple again. They did start a case up for me, as I was experiencing the same behavior on two different machines, with two different versions of Windows.
    So far it remains unsolved. I've logged iClouds for Windows on my desktop, which is brand new, then logged for awhile after completely uninstalling Norton Security Suite, depending on the Microsoft security for some time, and finally logged after I uninstalled iCloud for Windows, restarted, installed a clean download, and connected using a completely different test account, which Apple set up for me. None of this made any difference. Looking at the logs, it seems every 10 minutes, iCloudServices.exe creates a new TCP connection to confirm I'm using less than 5GB on iCloud, (which I am by a good margin, using less than 2GB), it seems this connection is not closed, and when the next iteration rolls around 10 minutes later, a new TCP connection is created. I come very close to having 6 TCP connections created per hour, until I restart my computer. This works out to... 6 x 24 = 144/day.
    Perhaps the article you posted will shed some further light on this. I'm thinking seeing the state of the connection through netstats, at the least, could help.
    For the last week, I've been putting a hold on further logging, as Apple wants me to create a new user account on one of my computers, install iCloud for Windows there, and log it running in the other account. This however basically means I cannot use my computer for a fair number of hours, and I've been busy enough with work the past week that I haven't the time or energy to afford to set this up and run it. I've had need of my computers too much for the past week.

  • Kernel_task running above 500% CPU load on my Macbook Pro running OSX 10.9.4

    I recently upgrade my Macbook Pro to OSX 9.0.4 and the system is running sluggishly slow, Activity Monitor showing kernel_task always running above 500% CPU load, system fan always running loud at startup but laptop is not overheating.  Below is the EtreCheck report, hoping if anyone can help me fix this issue, much appreciate it.  Btw, I have done the SMC reset, but nothing has helped.
    EtreCheck version: 1.9.13 (49)
    Report generated 16 August 2014 2:30:27 pm AEST
    Hardware Information: ?
      MacBook Pro (Retina, Mid 2012) (Verified)
      MacBook Pro - model: MacBookPro10,1
      1 2.3 GHz Intel Core i7 CPU: 4 cores
      8 GB RAM
    Video Information: ?
      Intel HD Graphics 4000 - VRAM: (null)
      Color LCD 2880 x 1800
      NVIDIA GeForce GT 650M - VRAM: 1024 MB
    System Software: ?
      OS X 10.9.4 (13E28) - Uptime: 0 days 0:17:38
    Disk Information: ?
      APPLE SSD SM256E disk0 : (251 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted>: 209.7 MB
      Macintosh HD (disk0s2) / [Startup]: 250.14 GB (103.87 GB free)
      Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information: ?
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
    Thunderbolt Information: ?
      Apple Inc. thunderbolt_bus
    Gatekeeper: ?
      Mac App Store and identified developers
    Kernel Extensions: ?
      [not loaded] com.digidesign.fwfamily.driver (8.0.3f1) Support
      [loaded] com.digidesign.iokit.DigiDal (8.0.3f1) Support
      [not loaded] com.digidesign.mbox2.boot.driver (9.0f4) Support
      [not loaded] com.digidesign.mbox2.driver (9.0f4) Support
      [not loaded] com.digidesign.usb.elevenrack.driver (1.0.1) Support
      [not loaded] com.paceap.kext.pacesupport.leopard (5.8 - SDK 10.4) Support
      [not loaded] com.paceap.kext.pacesupport.master (5.8) Support
      [not loaded] com.paceap.kext.pacesupport.panther (5.8 - SDK 10.3) Support
      [loaded] com.paceap.kext.pacesupport.snowleopard (5.8 - SDK 10.6) Support
      [not loaded] com.paceap.kext.pacesupport.tiger (5.8 - SDK 10.4) Support
    Startup Items: ?
      Digidesign Mbox 2: Path: /Library/StartupItems/Digidesign Mbox 2
      DigidesignLoader: Path: /Library/StartupItems/DigidesignLoader
      PACESupport: Path: /Library/StartupItems/PACESupport
    Problem System Launch Agents: ?
      [loaded] com.paragon.NTFS.trial.plist Support
      [loaded] com.paragon.NTFS.upd.plist Support
    Launch Daemons: ?
      [loaded] com.adobe.fpsaud.plist Support
      [running] com.cleverfiles.cfbackd.plist Support
      [running] com.digidesign.elevenrack.helper.plist Support
      [running] com.digidesign.fwfamily.helper.plist Support
      [loaded] com.google.keystone.daemon.plist Support
      [loaded] com.macpaw.CleanMyMac2.Agent.plist Support
      [loaded] com.oracle.java.JavaUpdateHelper.plist Support
      [running] com.paceap.eden.licensed.plist Support
      [not loaded] com.teamviewer.teamviewer_service.plist Support
      [loaded] PACESupport.plist Support
    Launch Agents: ?
      [loaded] com.google.keystone.agent.plist Support
      [not loaded] com.teamviewer.teamviewer.plist Support
      [not loaded] com.teamviewer.teamviewer_desktop.plist Support
    User Launch Agents: ?
      [failed] com.facebook.videochat.[redacted].plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.diskSpaceWatcher.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.scheduledScan.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.trashWatcher.plist Support
    User Login Items: ?
      iTunesHelper
      SmartDaemon
      BitTorrent
      uTorrent
      Knock
      Autodesk 360
    Internet Plug-ins: ?
      JavaAppletPlugin: Version: Java 7 Update 55 Check version
      FlashPlayer-10.6: Version: 14.0.0.145 - SDK 10.6 Support
      Default Browser: Version: 537 - SDK 10.9
      Flash Player: Version: 14.0.0.145 - SDK 10.6 Outdated! Update
      QuickTime Plugin: Version: 7.7.3
      o1dbrowserplugin: Version: 5.4.2.18903 Support
      googletalkbrowserplugin: Version: 5.4.2.18903 Support
      iPhotoPhotocast: Version: 7.0
    Safari Extensions: ?
      AllMyTube
      Searchme-2
      iTube Studio
    Audio Plug-ins: ?
      BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
      AirPlay: Version: 2.0 - SDK 10.9
      AppleAVBAudio: Version: 203.2 - SDK 10.9
      iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins: ?
      Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    3rd Party Preference Panes: ?
      Digidesign Eleven Rack  Support
      DigidesignMbox2  Support
      Digidesign Mbox 2 Pro  Support
      Flash Player  Support
      MacFUSE  Support
      Paragon NTFS for Mac ® OS X  Support
    Time Machine: ?
      Time Machine not configured!
    Top Processes by CPU: ?
          4% WindowServer
          4% Google Chrome
          1% cfbackd
          0% AppleSpell
          0% Activity Monitor
    Top Processes by Memory: ?
      213 MB Finder
      156 MB Dock
      156 MB com.apple.IconServicesAgent
      123 MB WindowServer
      115 MB Google Chrome
    Virtual Memory Information: ?
      4.43 GB Free RAM
      2.21 GB Active RAM
      414 MB Inactive RAM
      971 MB Wired RAM
      527 MB Page-ins
      0 B Page-outs

    The kernel is using excessive processor cycles. Below are some possible causes for the condition.
    Throttling
    When it gets high temperature readings from the hardware, or a low-voltage reading from the battery, the kernel may try to compensate by interrupting the processor(s) to slow them down and reduce power consumption. This condition can be due to:
    ☞ a buildup of dust on the logic board
    ☞ high ambient temperature
    ☞ a worn-out or faulty battery in a portable
    ☞ the malfunction of a cooling fan, a temperature sensor, a voltage sensor, or some other internal component
    Note that if the problem is caused by a sensor, there may be no actual overheating or undervoltage.
    If the computer is portable, test with and without the AC adapter connected. If kernel_task hogs the processor only on battery power, the fault is in the battery or the logic board. If it happens only on AC power, charging is causing the machine to heat up. That may be normal on some models. CPU usage should drop when charging is complete.
    Apple Diagnostics or the Apple Hardware Test, though not very reliable, is sometimes able to detect a fault. For more thorough hardware testing, make a "Genius" appointment at an Apple Store, or go to another authorized service provider.
    If nothing is wrong with the hardware, then whatever you can do to improve cooling may help.
    Installed software
    User-installed software that includes a device driver or other kernel code may thrash the kernel. That category includes virtualization software, such as Parallels and VMware, as well as most commercial "anti-virus" products. Some system-monitoring applications, such as "iStat," can also contribute to the problem. You can test for this possibility by completely disabling or removing the software according to the developer's instructions, or starting in safe mode. Note, however, that disabling a system modification without removing it or testing in safe mode may not be as easy as you think.
    Corrupt NVRAM or SMC data
    Sometimes the problem is cleared up by resetting the NVRAM or the SMC.
    External display
    Connecting an external LCD display to some MacBook Pro models while the lid is open may cause this issue. If applicable, test by closing the lid or disconnecting the display. You might get better results with a newer LED display.

  • High CPU load on SUP720-3BXL / C6k

    Hi,
    I know it has been discussed many times before, but may I get some new inspiration to solve some problems here.
    We've some c6509 with SUP720-3BXL. One of routers has a WS-X6704-10G module with DFC. This is the only card installed besides the SUP720. We're run into some heavy CPU problems regarding the RP:
    c6k-05#sh proc cpu sorted
    CPU utilization for five seconds: 71%/12%; one minute: 77%; five minutes: 78%
     PID Runtime(ms)   Invoked      uSecs   5Sec   1Min   5Min TTY Process
     252    70001864  72821359        961 37.88% 34.97% 33.83%   0 Earl NDE Task
      12    13535512   7478495       1809  9.67%  7.18%  5.88%   0 ARP Input
     354    13418508    655279      20477  7.27%  6.52%  6.47%   0 CEF: IPv4 proces
     275     5628156  14433722        389  2.79%  2.47%  2.46%   0 ADJ resolve proc
     273     5720936   8782567        651  0.31%  0.56%  2.06%   0 IP Input
    SP looks like normal:
    c6k-05#remote command switch sh proc cpu sorted
    CPU utilization for five seconds: 24%/0%; one minute: 24%; five minutes: 25%
    PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
    316 5711876 422724 13512 6.55% 3.36% 3.18% 0 Hardware API bac
    109 10629720 20123627 528 6.31% 6.87% 6.98% 0 slcp process
    3 10847468 988165 10977 5.27% 6.11% 6.13% 0 CEF: IPv4 proces
    253 3055016 108213 28231 1.67% 1.70% 1.70% 0 Vlan Statistics
    c6k-05.nc#sh proc cpu history
    7777666668888888888999998888877777777766666777777777777777
    6666888880000044444222220000000000333399999555557777755555
    100
    90 *****
    80 **** ******************** ***************
    70 **********************************************************
    60 **********************************************************
    50 **********************************************************
    40 **********************************************************
    30 **********************************************************
    20 **********************************************************
    10 **********************************************************
    0....5....1....1....2....2....3....3....4....4....5....5....
    0 5 0 5 0 5 0 5 0 5
    CPU% per second (last 60 seconds)
    9999988999999999888989899999999889999999999999999999999999
    1522389859375081979774546389531690556610500213560563134442
    100 * *** ** * * * *#* **** * ** **
    90 **************************##******************************
    80 #############*#########*##################################
    70 ##########################################################
    60 ##########################################################
    50 ##########################################################
    40 ##########################################################
    30 ##########################################################
    20 ##########################################################
    10 ##########################################################
    0....5....1....1....2....2....3....3....4....4....5....5....
    0 5 0 5 0 5 0 5 0 5
    CPU% per minute (last 60 minutes)
    * = maximum CPU% # = average CPU%
    9999999999999999999999999999999999999999999999999
    9999999999999999999999999999998999999999999999999
    100 *************************************************
    90 *****##******************************************
    80 #################################################
    70 #################################################
    60 #################################################
    50 #################################################
    40 #################################################
    30 #################################################
    20 #################################################
    10 #################################################
    0....5....1....1....2....2....3....3....4....4....5....5....6....6....7.
    0 5 0 5 0 5 0 5 0 5 0 5 0
    CPU% per hour (last 72 hours)
    * = maximum CPU% # = average CPU%
    Our Netflow statistics will consume many of the CPU time, this is clear.
    ip flow-cache timeout inactive 10
    ip flow-cache timeout active 1
    mls aging fast time 14
    mls aging long 64
    mls aging normal 45
    mls netflow interface
    mls netflow usage notify 90 21600
    mls flow ip interface-full
    mls flow ipv6 interface-full
    mls nde sender version 5
    Anything else to search for? This box has a lot of L3 VLANs and many many /24 subnets as secondary addresses inside the SVIs. QoS and COOP is enabled and heavily used. The box receive one full-table (~508k), one partial table (~130k) and two iBGP feeds with ~1k prefixes.
    c6k-05#sh int te1/1 | i 5 minute
    5 minute input rate 917021000 bits/sec, 576857 packets/sec
    5 minute output rate 1021949000 bits/sec, 376221 packets/sec
    c6k-05.nc#sh int te1/3 | i 5 minute
    5 minute input rate 1266207000 bits/sec, 450679 packets/sec
    5 minute output rate 2140145000 bits/sec, 1342052 packets/sec
    c6k-05#sh ver | i IOS
    Cisco IOS Software, s72033_rp Software (s72033_rp-ADVENTERPRISEK9_WAN-M), Version 12.2(33)SXI14, RELEASE SOFTWARE (fc2)
    Don't know if this is CPU related: (messages appears every 2-3 min. in the log)
    Nov 25 15:51:45.558 CET: %SYS-3-CPUHOG: Task is running for (204)msecs, more than (200)msecs (14/7),process = BGP Scheduler.
    -Traceback= 4035A898 4036D818 4036D9AC 4166696C 4036F228 4036F310 4166BB70 4166BB5C
    Any suggestions? Thanks in advance.
    Thomas

    Hi Rajeev,
    we have temporary disabled Netflow after we ran into a flapping BGP session problem one hour ago. Router killed BGP related processes due to no free CPU time.
    After disabling Netflow, the load of the RP has been decreased dramaticly from <80% to ~30%. But we can't disable Netflow at all because we need the flows to get information for our DDoS protection.
    We have now increased CPU ressources for processes:
    (no scheduler max-task-time)
    scheduler allocate 10000 4000
    CPU load is (very) high again:
    c6k-05.nc#sh proc cpu sorted
    CPU utilization for five seconds: 90%/21%; one minute: 85%; five minutes: 86%
    PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
    252 107378140 111133354 966 23.43% 25.49% 23.13% 0 Earl NDE Task
    563 7056500 8738616 807 17.75% 2.72% 2.12% 0 SNMP ENGINE
    354 21164144 876799 24138 5.75% 6.37% 6.35% 0 CEF: IPv4 proces
    12 22983692 11691250 1965 5.43% 6.08% 5.60% 0 ARP Input
    273 10269700 12841900 799 4.95% 9.15% 11.49% 0 IP Input
    329 889568 11066 80387 3.35% 0.41% 0.27% 0 IP Background
    275 8864220 22191938 399 2.63% 2.48% 2.50% 0 ADJ resolve proc
    342 3048616 225163 13539 1.51% 0.73% 0.72% 0 IPC LC Message H
    514 3188912 929923 3429 1.27% 0.84% 0.89% 0 BGP Router
    52 319360 7229 44177 1.19% 0.14% 0.07% 0 Per-minute Jobs
    561 634184 4164207 152 0.63% 0.18% 0.16% 0 IP SNMP
    All is unsatisfactory :-(
    Kind regards,
    Thomas

  • Start x11vnc -- X uses 100% cpu load

    Hi.
    I switched to arch64 and today I first used x11vnc and it is extremly slow. First I thought about the proxied connection but after looking into top I found X is using 100% cpu load. With arch32 everything worked as normal. Don't know whats the problem - any advices?
    Regard, Andreas

    Hmmm, I switched from official nvidia driver to xf86-video-nv and now works much better. I'll try it again with nvidia but not today...

  • Thoughts about Connection Consumer

    Hi All,
    I was going through the jms interfaces and came across the Connection Consumer interface. I'm not very sure, how well does this interface work within a scope of an XA transaction.
    I believe that Application Servers use connection consumers in order to service MDBs deployed on them. The connection consumer's job is to fetch messages from the server and fill up the JMS session in the server session pool provided by the App Server.
    My question is how does the connection consumer associate the transaction context with the message it pops from the server. Note the connection is not aware of any transaction.
    Thanks
    - k

    Hi,
    Thanks for ur reply. However, there is still a little bit of confusion. Please read on..
    As JMS�s transactions are managed on the session
    level, a message that is loaded in a session by the
    connection consumer is viewed as consumed within this
    session and therefore its consumption falls under the
    session�s transaction. From this it appears that the connection consumer fetches a message from the server and then loads it into a session (which might be an xa session). However when the JMS server had sent this message it was obviously unaware of the transaction of which this message would be a part of.
    And working the above arguement backwards, I can say that the JMS Server could only be aware of the the transaction context if and only if the connection consumer sends it with the request to pop a message. The connection consumer can only get the transaction context from the session to which it would deliver the message. => The connection consumer needs to pop a session first and then send a request to the server along with it's transaction context. However, the specs seem to indicate the opposite.
    You may be careful here, and check your JMS
    implementation behaviour as some JMS vendors
    may commit or abort all the messages that have
    been previously loaded in the session. I understand that this issue would be specific to the jms vendor. I hope some vendors on this group can shed light on how they handle this.
    Thanks
    -K

  • CPU Load 98% after changed MTU size

    Hi,
    I am having problem here. Previously, when the MTU was 1508...The cpu load was <5%. When changed to 1512, the load was increasing 70%. Recently, changed to 1522, the load is >95%. Not sure what's going with the configuration. But I can a lot ques dropping. Should I put on the port-channel 1? For more details configuration, please refer to attached file
    hold-queue 1024 in
    hold-queue 1024 out
    # show proce cpu
    CPU utilization for five seconds: 96%/38%; one minute: 96%; five minutes: 96%
    PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
    # show proce cpu | include Tag
    165 150300 11396947 13 0.07% 0.01% 0.00% 0 Tag Control
    193 2608887200 237733062 10974 52.23% 52.71% 52.44% 0 Tag Input
    304 4692 36566 128 0.00% 0.00% 0.00% 0 Tagcon Addr
    Any idea guys. Thanks lot

    I had this same exact problem on the cat 6500 running SXF10. Where I enabled MPLS and it caused CPU to spike. So to check what is getting forwarded to the MSFC perform the following to see a packet capture of what is hitting the CPU. So you need to run a SNIFFER capture.
    Note this is only for the 6500 platform... once you check what's hitting the CPU (eg: fragmentation, icmp type 3 code 4's, etc al)...
    Here are the instructions to setup inband span (which monitors traffic sent
    to the MSFC):
    Router#monitor session 1 source interface fa 3/3 !--- Use any interface that
    is administratively shut down.
    Router#monitor session 1 destination interface fa 3/2 !-- connected to sniffer port
    Now, go to the SP console. Here is an example:
    Router#remote login switch
    Router-sp#test monitor add 1 rp-inband rx <--- check the syntax as it varies
    from one IOS to the next so use ?
    Verify monitor session:
    Router-sp#test monitor show session 1
    Ingress Source Ports: 3/3 15/1
    Egress Source Ports: 3/3
    Ingress Source Vlans:
    Egress Source Vlans:
    Filter Vlans:
    Destination Ports: 3/2
    Go back to the RP and verify the monitor session as well:
    Router#show monitor
    Session 1
    Type : Local Session
    Source Ports :
    Both : Fa3/3
    Destination Ports : Fa3/2
    SP console:
    Router-sp#test monitor session 1 show
    Ingress Source Ports: 3/3 15/1
    Egress Source Ports: 3/3
    Ingress Source Vlans:
    Egress Source Vlans:
    Filter Vlans:
    Destination Ports: 3/2
    To remove the inband span from sp do test monitor session 1 del and from the rp do no mon sess all
    ===============================
    So my exact issue was two parts, CPU spike up 99% when WCCP was enabled with MPLS tag switching at the same time. Rebooting didnt help... I ended up changing from SXF10 to SXF14 IOS just in case but I still had high CPU after upgrade. But the major difference was when I removed the ACL tied to WCCP and removing the ACL completely and re-pasting into the configs for WAAS and then reapplying. But in my sniffer capture I did notice a lot of ip fragmentation hitting the MSFC processor. Now my MTU is 1522 and works fine.

  • Resolving a TCP connection "slowdown" problem

    SuSE 9.3, stock kernel
    Intel architecture
    Jrockit-R26.4.0-jdk1.5.0_06-linux-ia32
    I have a problem that appears to be localized in Jrockit (or
    localized in the application, which is localized in Jrockit), where a
    persistent and high-volume TCP connection slows down over the course
    of about an hour--and eventually, effectively halts.
    The TCP traffic is a stream of data, arriving at a near-constant rate
    of about 16K bytes per second, with the receiving end (with the JVM
    and app) strictly sending TCP ACKs in reply.
    Restarting the sending process, or shutting down and restarting the
    connection with the JVM / app, both restore the connection to full
    speed until, over the course of perhaps an hour (sometimes more,
    sometimes less) the same symptoms appear.
    The symptoms in network packet traces are that when the connection is
    first opened, the sender transmits packets at the full MTU of the
    Ethernet segment. Gradually, the number of full-MTU sized packets
    are replaced with packets much smaller packets, until most packets
    range from 1 to 4 bytes with the occasional 3xx-4xx byte packet and
    the odd offlier of a full-MTU packet size.
    Supporting symptoms of interest:
    1) The TCP window does not shrink
    2) The CPU on the JVM/app side tops out at around 20%, even with
    mySQL running on the machine
    3) The interval between successive ACKs transmitted from the JVM/app
    size generally narrows over the course of the connection
    4) TCP send queue on the sender becomes saturated (pegged at 90+ K)
    5) TCP receive queue on the JVM/app side is almost always 0, and when
    it is not zero is bursts up to a low number (<50) and then almost
    immediately returns to 0
    6) The app does not appear to present any general symptoms of
    slowness; the rate of writes to the database does not appear to slow.
    The writes are threaded and multiplexed
    [4] strongly implies that the slowness is caused by the JVM/app side,
    since if the sender app was slowing down for some reason its TCP send
    queue would not be saturated.
    I can copiously document everything stated, and additionally provide
    much additional detail.
    Any guidance on how to suss out role Jrockit or the app are playing
    in this little drama would be very deeply appreciated.

    Asked around and it seems unlikely that this is a JVM issue. We have never heard of this behavior before, and the network layer in the JVM doesn't do anything with MTU iirc with the possible exception of manual changes to socket options. It seems more likely that this is caused by the IP stack, the NIC device driver or something in the network configuration. Try making some changes here and see what happens. For instance:
    1) Run client and server on the same machine, communicating through loopback
    2) Try another Linux distro (CentOS 4.3, for instance)
    3) Try a different NIC and/or a different device driver
    In your Java code, check that you are closing all Socket objects properly. Leaving them to be closed by a finalizer can delay closing sockets resulting in a native resource leak. I don't see how that would cause the issue you describe, but you never know...

  • Outgoing TCP connections from VM have very low firewall state idle timeout -- how do you adjust?

    When I create a TCP connection from a VM to the internet, if I'm idle for more than a few minutes (say a SSH session), the TCP flow is torn down by some AZURE networking element in between.
    Incoming connections from the internet in don't seem to be affected.
    I assume this is an Azure firewall timeout somewhere.
    Is there any way to raise this?

    Hi,
    Thanks for posting here.
    Here are some suggestions:
    [1] - You can make sure the TCP connection is not idle. To keep your TCP connection active you can keeping sending some data before 60 seconds passes. This could be done via chunked transfer encoding; send something or you can just send blank lines to keep
    the connection active.
    [2] - If you are using WCF based application please have a look at below link:
    Reference:
    http://code.msdn.microsoft.com/WCF-Azure-NetTCP-Keep-Alive-09f50fd9
    [3] - If you are using TCP Sockets then you can also try ServicePointManager.SetTcpKeepAlive(true, 30000, 30000) might be used to do this. TCP Keep-Alive packets will keep the connection from your client to the load balancer open during a long-running HTTP
    request. For example if you’re using .NET WebRequest objects in your client you would set ServicePointManager.SetTcpKeepAlive(…) appropriately.
    Reference -
    http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.settcpkeepalive.aspx
    Hope this helps you.
    Girish Prajwal

  • Unable to establish TCP connection when enabling internet sharing (Phone acting as hotspot)

    I have developed a small .NET Desktop application which hosts a TCP service. In addition, it sends UDP Multicasts to anounce that service.
    Service consumer is a Phone 8.1 app, which listens for these UDP multicasts and when it receives such a multicast, it creates a TCP connection to the service.
    The following snippet shows how the Phone 8.1 app listens for UDP packets and then connects via TCP
    const string UdpPort = "42";
    const string TcpPort = "43";
    const string MultiCastIp = "224.5.6.7";
    const int TimeoutForServerLookup = 10000;
    //-- listen for UDP multicasts
    HostName hostNameOfServer = null;
    var udp = new DatagramSocket();
    var clientFound = false;
    udp.MessageReceived += delegate(DatagramSocket sender, DatagramSocketMessageReceivedEventArgs args)
    try
    hostNameOfServer = args.RemoteAddress;
    catch (Exception ex)
    s_Log.Error("Error in handling UDP packet", ex);
    await udp.BindServiceNameAsync(UdpPort);
    udp.JoinMulticastGroup(new HostName(MultiCastIp));
    var waitedTimeInMs = 0;
    const int delayInMs = 250;
    while (waitedTimeInMs < TimeoutForServerLookup && hostNameOfServer == null)
    waitedTimeInMs += delayInMs;
    await Task.Delay(TimeSpan.FromMilliseconds(delayInMs));
    udp.Dispose();
    //-- we now have the adress of the TCP server (hostNameOfServer)
    //-- connect now to the server. this works when being in a "normal" WLAN, does not work when the phone is the hotspot
    var socket = new StreamSocket();
    await socket.ConnectAsync(hostNameOfServer, TcpPort);
    This works well when the Desktop computer and the Windows Phone 8.1 are within the same WLAN. For some customers it is important that this also works when the Windows Phone 8.1 acts as hotspot (by enabling internet sharing on the phone) and the desktop computer
    (or Laptop) connects itself to this WLAN. In this scenario the Phone 8.1 still receives the UDP packets, but when trying to connect via TCP, the connection attempt fails.
    Any ideas how to get rid of this problem?

    Have you tracked down if the phone actually sends the TCP connection to the desktop? I'm feeling that this is a firewall issue that shows itself when the firewall zone changes (public/private/domain).
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

Maybe you are looking for

  • Master/detail and problem with selected row when errors on detail row

    I'm using JDeveloper 10.1.3.3 I have a very simple master/detail screen (JSF JSP) where master is departments and detail is employees in the selected department. Some of the attributes in employees are required. To department A I take away the value

  • Setting default outgoing email address

    I have multiple email addresses that I use in Mail, on my MacBook. Most of them are gmail accounts. Two are godaddy accounts, with personal domain names. I want to have a "main" one (a gmail account) that all my mail goes out from. If I'm in the "wro

  • Is SP 2013 Service Pack1 mandatory for my portal

     hi, Our application is still in UAT env. and NOT deployed in the prod. farm.  But my customer's IT team has created few webapplns on the already provisioned prod.farm. Currenty there is no SP2013 SP1 installed on the prod.farm. Now in my dev and UAT

  • Can't find "effects" presets and need general direction.

    Hi all. I'm a moderately seasoned Logic Pro 7 and 8 user. But i am totally new to Soundtrack pro. I just loaded soundtrack pro because i didn't load it when i initially loaded logic pro and waveburner. thought i would try out some of the noise reduct

  • Most of the .mov and .AVI files doesn't play anymore with QT 7 or 10

    I'm running OS 10.7.5 and most of the .mov files that were generated with Quicktime 7 doesn't play anymore, except in VLC. I used QT7 because it can still crop and edit videos, instead of QT 10 that came with the system. QT7 has a also a very nice fe