90% cpu load on ubuntu 8.04

Hello all,
I made a visualization for sorting algorithms. (The code is to long to post it here)
I developed the app under this system:
Windows Vista Home x64
Dualcore ~2.6GHz
Java Version: 1.6.0 Update 7 32bit
and i have a cpu load of ~10% when i run the app.
I asked my friend to test the app under his OS:
Ubuntu 8.04
Dualcore ~2.2Ghz
Java Version: 1.6.0 Update 7 32bit
and he got a cpu load of over 90%!
We both had no running tasks in background. It was only the java app.
Are there any known issues about this problem or could could it be a coding problem?
Btw the programm uses round about 8 Threads.
TIA

mod235711 wrote:
I'm sry.
Ok i try to specify a little bit more.
e.g.: I have this code snippet to check whenever the algorithm has finished.
while (!algorithm.isIdle())
                              try
                                   sleep(1);
                              catch (InterruptedException e)
                                   clockRefresh.interrupt();
                                   setIdle();
                         }Without the sleep I have a cpu load of 50% (of course, because it is an endless loop until the algorithm has finished).
But with the sleep time it's just 1 or 2%.
I want to know if there is a known issue in the JVM that causes threads on some systems to use to much cpu load.
Or could it be a coding problem?
What do you think about the sleep time in this loop?
Or could the high cpu load be caused by bad coding?After reading this post I could not read further. There is the problem. You're doing a sleep(1) .....
Even in C that will most likely kill any cpu. Try to use joins: elegant and faster ;)

Similar Messages

  • (Linux, SL510, NSLDEGE) No processes, 100% CPU-load reboot 1% CPU-load

    I have a very big problem:
    I bought a Lenovo ThinkPad SL510 NSLDEGE (2847-DEG) on this (german) website with no installed operating system. At first, I installed Ubuntu GNU/Linux 10.04 which worked excellently at the first view.
    But then the big problem appeared the first time: suddenly my CPU-load grew from ca. 3% to 100% (because I started an editor or I opened a new firefox-tab) and I couldn't use my ThinkPad in any way, until the system crashed and I had to reboot. After the reboot all worked fine.
    This problem appeares intermittent and I always see my last chance in rebooting the entire operating system. I've already tried different Linux-Distributions, but this did not solve my problem. And I've already tested my random access memory (RAM) with Memtest86.
    Thus, my question is: Do you have an idea, what could cause this problem? What could be the reason for my CPU-crashes?
    Greetings, Mekeor

    I'm sure that this is not a Linux-problem!
    Furthermore I wrote a bug report on launchpad (the ubuntu bug-report-website) here: https://bugs.launchpad.net/ubuntu/+bug/615792 . And here is my first forum-entry in the german ubuntu-forums (forum.ubuntuusers.de).
    Besides this phenomenon, I think, is a  specific characteristic of my Model (SL510, NSLDEGE)!
    mekeor

  • High CPU load with nfs4

    Has anyone noticed a high cpu load when transferring over nfs4.
    My arch box has a dual core amd with 4 gig of ram.  It has a rocketraid 2320 card being used for a 8 1TB mdadm raid 6.
    I am transferring from ubuntu -> arch box.  I am noticing high cpu on both sides.  I dont know if its an nfs issue or what.
    On the arch side I am seeing high usage from nfsd , flush-9:0, and an mdadm process.  Both cores are sitting around 50%.
    Anyone run into this or know if its an issue with nfs4? or maybe different nfs versions of ubuntu and arch.
    Thanks.

    Adobe need to realize that once their great product with a lot of penetration into the web ad + ria market is starting loose its ground as they simply can't address ongoing issue on their poor flash plug-in performance other than on windows platform. There are a lot of flash enthusiast out there but this poor support from the Adobe doesn't help this much further. One of the reasons why other software vendors pushing for more open standard RIA platforms other than Flash based...
    Only suggestion that I have with Adobe is that if you can not get it right then, it may help to open up flash player source to the community. I am pretty sure that there are a lot of developers out there who can help out to drive better code base for the player and in turn make flash more adopted by non non ms windows user base. At the moment, I have installed "Click2Flash" and "FlashBlock" to save majority of CPU cycle on my MacBook Pro. Imagine the impact on this for future Adobe product. All online ad will slowly move away from flash based and in turn loosing entire market share it has successfully built over the years... Well must note that MS isn't much better either... MS RDP client is permanently turned off from my system, now I'm using CoRD instead..
    I sincerely hope to see some major performance improvements in near future.

  • How do you spread CPU load over more cores?

    Hi
    I recently bought a macbook pro quadcore i7 because my 2007 macbook couldn't cope with the demands of Logic when using it rewired with Ableton Live, and had lots of CPU overload messages.
    I am really disappointed that having spent so much money to overcome this problem, it has only slightly improved the amount of overload messages. I read the article below about how to spread CPU power over the cores, now I have 8. I still can't figure out though how to control which channels are using which core and spreading the CPU load to cores 5-8 which don't seem to be being used. Any ideas?
    Can I rewire from ableton to different cores?
    In my project, the 2nd core keeps overloading whilst the others are down. Is it to do with aux channels, master channels, buses etc?
    Or should I upload my memory to 8GB RAM?
    Thanks
    Steve
    Here's the article:
    About core activity
    Logic breaks tasks down into threads that can be assigned to a single core for execution. It's not possible to split a single thread across multiple cores, although a single core may run multiple threads at the same time. This is one reason that you may sometimes see uneven load distributions across the available cores on your computer. If one thread is very processor-intensive, the core running that thread may show much more activity than the cores running less demanding tasks. This is the main reason that you may get "Core Audio Overload" warning messages even though some of the cores on your system may not show significant activity.
    To monitor Logic as it uses the cores on your system, double-click the CPU meter in the Transport area.
    A window displays a meter for each core.
    The same concept applies to channel strips as well. Each channel strip—and all plug-ins it contains—is processed by one core. If you are using many processor-intensive plug-ins on a single channel strip, the core running it may show heavier activity. This is especially true if you are working at high sample rates (88.2 kHz or higher).
    Redistributing core loads
    If you find that a single core has much higher activity, use these strategies to redistribute the load.
    In the example below, there is a single Software Instrument channel strip with plug-ins routed directly to Output 1-2. The channel strip for Output 1-2 has a large number of plug-ins.
    In this example there is activity on two cores:  the left core is handling the Software Instrument while the next core processes the Output 1-2 channel strip. You can use routing capabilities in Logic to distribute the load to more cores without changing the sound, as in the next image.
    The resulting signal chain is Inst 1 > Aux 1 > Aux 2 > Out 1-2, as shown in this table:
    Channel strip
    Input
    Output
    Inst 1
    Bus 1
    Aux 1
    Bus 1
    Bus 2
    Aux 2
    Bus 2
    Out 1-2
    Also, the first four plug-ins have moved from Output 1-2 to Aux 1 and the remaining four plug-ins to Aux 2.
    After adjusting the volumes to the respective channel strips appropriately, the result sounds identical, but now the load is distributed among four cores instead of two. You can use this concept to redistribute plug-ins from Audio channel strips, Software Instruments, Auxes, and Outputs (as in this example).
    In the image above, there is still a very heavy load on a single core, even though it's using the routing described above. Notice the Inst 1 channel strip is selected. When a Software Instrument track is selected in the Arrange window, Logic enters "Live Input Mode". In this mode, Logic turns on every plug-in in the channel strip's signal path so the channel strip can be played live from a MIDI controller. All of this must be handled by a single thread and therefore just one core. It's a good idea to keep a track that uses an Audio channel strip selected in the Arrange window, unless you're actively playing or recording to a Software Instrument.

    OS X Snow Leopard introduced Grand Central, where the OS will distribute the load better to more cores, however it takes time for software to adapt to these changes and make a rewrite of the codebase and test it out, Apple's included.

  • 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

  • Hwmond high cpu load after 10.6.8 update

    hwmond is causing up to 70% cpu load after every reboot on several xserves i manage caused by the update to 10.6.8. anybody else having this problem? it can be solved by hwmond -s5 to set the hwmond interval to 5 seconds but this command is not processed properly, is causing an error message "IOConnectMethodScalarIScalra0 call return err = 0xE00002BC" and has to be exited with cmd+c. Also, the com.apple.hwmond.plist in LaunchDaemons is empty.

    In my case:
    I installed 10.6.8 via the Combo Update, was running 10.6.7 previous to this.
    /System/Library/LaunchDaemons/com.apple.hwmond.plist still exists and is not empty
    /etc/hwmond.SMART still exists and is not empty
    /etc/hwmond.conf didn't exist, so from Terminal.app I simply issued "sudo touch /etc/hwmond.conf"
    I tried:
    In Terminal.app, ran:sudo launchctl unload /System/Library/LaunchDaemons/com.apple.hwmond.plist
    Then, backed up /usr/sbin/hwmond and /System/Library/LaunchDaemons/com.apple.hwmond.plist
    From a Mac Pro running 10.6.7 Server, copied both the binary and the plist to the same spots on the Xserve, then, in Terminal.app, ran:sudo launchctl load /System/Library/LaunchDaemons/com.apple.hwmond.plist
    That didn't change a thing. hwmond still spiked.
    Put everything back the way it was.
    And:
    In Terminal.app, ran:sudo launchctl unload /System/Library/LaunchDaemons/com.apple.hwmond.plist
    Backed up /System/Library/LaunchDaemons/com.apple.hwmond.plist
    Made another copy to the Desktop
    Edited this copy and added a string in ProgramArguments with a value of "-S255", but this still caused hwmond to spike after putting this copy back in LaunchDaemons, repairing permissions, and loading the plist via launchctl again. Any valid value still caused it to spike. However my Xserve now reboots if I set the value to an invalid value, like "-s256". Then again this also caused com.apple.hwmond and com.apple.launchd to create entries in the system log complaining about the value with hwmond attempting to relaunch itself every 10 seconds:
    6/24/11 2:37:10 PM com.apple.hwmond[2697] hwmond: n should be 1 to 255 seconds
    6/24/11 2:37:10 PM com.apple.launchd[1] (com.apple.hwmond[2697]) Exited with exit code: 1
    6/24/11 2:37:10 PM          com.apple.launchd[1] (com.apple.hwmond) Throttling respawn: Will start in 10 seconds
    OP, Armin, did something similar, but I think he tried doing it directly in Terminal, not using launchctl / launchd, which caused the error he mentioned.
    Finally, added a "Disabled" item, with a boolean value of YES to the plist, recopied it, repaired permissions again (launchctl will complain and won't load the plist if you don't). This way hwmond is disabled, I can reboot my Xserve, and wait until Apple figures this out.
    Full com.apple.hwmond.plist on my Xserve looks like this now:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>Label</key>
              <string>com.apple.hwmond</string>
              <key>OnDemand</key>
              <false/>
              <key>Program</key>
              <string>/usr/sbin/hwmond</string>
              <key>ProgramArguments</key>
              <array>
                        <string>hwmond</string>
                        <string>-s255</string>
              </array>
              <key>ServiceIPC</key>
              <false/>
              <key>Disabled</key>
              <true/>
    </dict>
    </plist>
    Edit: I too have filed a bug report with a link to this thread included.
    Second Edit: Server Monitor.app still works after disabling hwmond via the plist even after a reboot.
    Third Edit: Sorry, keep remembering things, a modified /usr/sbin/hwmond was included the 10.6.8 Server Combo Update package, but not the Delta. Not sure if this matters. How has everyone updated to 10.6.8 so far? Like I mentioned, I used the Combo.

  • Problem... High CPU load with HDD. Please Help

    Hello all,
    Im stuck. Ive got a MSI KA790GX which has poor HDD access/transfer, low burst rate and very high CPU load.
    As far as i know the Western Digital 640gb WD6401AALS Black should be a fast hard drive. Which according to reviews/HD Tune,
    should be:-
    Minimum 60mb/sec
    Maximum 120mb/sec
    Average 95mb/sec
    Access 12ms
    Burst 110mb/sec
    CPU 5%
    No matter what I try, i always get poor results...
    My MSI KA790GX
    Minimum 41mb/sec ~ 54mb/sec
    Maximum 104mb/sec ~ 108mb/sec
    Average 86mb/sec ~89mb/sec
    Access 12ms
    Burst 60mb/sec ~ 80mb/sec
    CPU 26% ~ 44%!!!!!!!!
    I could accept not getting the same high speed results as the review/reference, even if the burst rate sucked.
    But one of the cores goes to 50%-60% load during hdd activity. Thats just crazy!!
    I have tried...
    IDE mode, AHCI, RAID Ready, RAID Single Disk
    SATA Port 1, 2, 3, 4 + 5
    Different SATA cables
    Flashed bios, cleared bios, optimised defaults, failsafe defaults
    Windows XP 32bit, Vista 32bit, Vista 64bit. fresh installs
    MSI CD Drivers, MSI Web Drivers, AMD/ATI Web Drivers
        ... and combinations of.
    I have also tested the WD640gb Black on another older PC, with Nvidia (55?) chipset and slower (1.9ghz x2) cpu.
    Transfer rates were slightly better than my KA790GX but, Burst Rate = 115mb/sec and CPU usage = 13%.
    I also tried a Seagate 1.5tb (ST31500341AS) on both PCs,
    Nvidia chipset
    Minimum 65mb/sec
    Maximum 134mb/sec
    Average 107mb/sec
    Access 14ms
    Burst 83mb/sec
    CPU 7%
    On my MSI KA790GX
    Minimum 55mb/sec
    Maximum 120mb/sec
    Average 100mb/sec
    Access 14ms
    Burst 87mb/sec
    CPU 33%!!!!
    Could someone please please help, ive spent hours and hours on this. Its doin my head in.
    I just hope its something stupid ive missed, cos i still not used my HD4850 from christmas :-(
    Thanks.

    Sm3K3R
    Not sure how to check PIO/DMA mode on a SATA device. IDE devices show DMA enabled.
    BIOS version 1.4 - 29 December 2008, and now version 1.51
    Fredrik
    I have Vista 64, but i did try XP32 and Vista32 and got similar poor results.
    I tested HDD speed with, HD Tune 2.55 and HD Tune 3.50 trial.
    No auto-start programs really, Windows clean installs + any drivers.
    Quadrifoglio Verde
    CPU @ default 2800mhz, All mem bios options to auto/defaults
    Windows Experience Index, CPU Score = 5.3
    AMD Overdrive
     Integer Computation = 8220
     Floating Point Computation = 5325
     Memory speed = 1770
     Cache Speed = 10790
     System Performance = 7403
    Bas
    I used HDTune because I could reference to other results. Whats a better program to use?
    Windows Experience Index, HDD Score = 5.9.
    But I have no reference and cant be sure of cpu load.
    Sepher
    Bios defaults to C&C and C1E off so i have tried them. Also windows power settings, balanced/high performance.
    UPDATE
    Reinstalled Vista64 but loaded the AHCI driver from the disk config screen. This seems to have stopped the high cpu usage during disk activity.
    HDTune with Windows Power settings @ High Performance,
    Min = 52mb/sec
    Max = 106mb/sec
    Ave = 88mb/sec
    Access = 12ms
    Burst = 77mb/sec
    CPU = 3.4% 
    HDTune with Windows Power settings @ Balanced
    Min = 54mb/sec
    Max = 104mb/sec
    Ave = 87mb/sec
    Access = 12ms
    Burst = 65mb/sec
    CPU = 12%
    So now transfer speed is about 10% slower than reference. But burst speed is terrible.
    I also used IBM Feature Tool to change the HDD AAM to 'performance mode' 254 as suggested elsewhere.
    Long shot as the hdd performs ok with other hardware. same results.
    Also MSI support asked me to try a newer bios, version 1.51. same results.
    Anyone know what the AMD 7-Series Chipsets Disk Performance Utility does, and should i run it in Vista64?
    Thanks for all the replies, hope i can sort this, not played any PC games since Quake 3 on my ti4600...

  • Adobe Reader 9.4-1 cause 100% CPU load on EL40 system

    Hi,
    when starting Adobe reader 9.4-1 on a Enterprise Linux 4 system the cpu load directly goes up to 100%
    This happens on EL40 update 4, 5 & 8
    I´m using gnome.
    uname -a
    Linux 2.6.9-89.0.0.0.1.ELsmp #1 SMP Tue May 19 04:23:49 EDT 2009 i686 i686 i386 GNU/Linux
    cat /etc/redhat-release
    Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
    Kind regards
    Agent

    I had the same problem on a RHEL4 system, I think starting with 9.3.1.  The system requirements say only RHEL 5 is supported so I just uninstalled 9.3 and didn't look into it further.

  • Instruments: Average CPU Load over one minute

    Hi everyone.
    I've written some compositions in Quartz Composer and want to demonstrate how they tax the CPU in various conditions.
    I've opened up Instruments and I can get it to give me a readout for the individual process (Quartz Composer) but I can't see any obvious way to average the CPU load... I can see the peaks, but I'd much rather know what the average is over 1 minute, in this instance (I want to compare different compositions - there's no variables within them as such...)
    I found a little DTrace script in the apple docs, but couldn't really get it to work... it would quit with an error after about 45 seconds...
    Anyone got any ideas?

    OS X Snow Leopard introduced Grand Central, where the OS will distribute the load better to more cores, however it takes time for software to adapt to these changes and make a rewrite of the codebase and test it out, Apple's included.

  • [Solved] Compiz eats up ~20% CPU load in idle after recent update

    Today I noticed that Compiz eats up 10-30% of CPU load resulting in the CPU clock often go up to maximum. It might be related with the recent updates but it's not sure - maybe the problem appeared earlier and I just didn't notice it. Restarting Compiz doesn't help, restarting the whole system neither. Here's today's update:
    [2012-07-05 09:24] upgraded libusb-compat (0.1.4-1 -> 0.1.4-2)
    [2012-07-05 09:24] upgraded pambase (20120602-1 -> 20120701-1)
    [2012-07-05 09:24] warning: /etc/pam.d/login installed as /etc/pam.d/login.pacnew
    [2012-07-05 09:24] upgraded util-linux (2.21.2-1 -> 2.21.2-3)
    [2012-07-05 09:24] upgraded shadow (4.1.5-4 -> 4.1.5.1-1)
    [2012-07-05 09:24] upgraded xfce4-wavelan-plugin (0.5.10-3 -> 0.5.11-1)
    [2012-07-05 09:24] upgraded xfce4-cpugraph-plugin (1.0.4-1 -> 1.0.5-1)
    Yesterday's update:
    [2012-07-04 07:40] removed python-beautifulsoup (3.2.0-2)
    [2012-07-04 07:40] upgraded wpa_supplicant (0.7.3-5 -> 1.0-1)
    [2012-07-04 07:40] upgraded libldap (2.4.31-3 -> 2.4.31-4)
    [2012-07-04 07:40] upgraded links (2.6-1 -> 2.7-1)
    [2012-07-04 07:40] upgraded ppl (0.12.1-1 -> 1.0-1)
    [2012-07-04 07:40] upgraded run-parts (4.3.1-1 -> 4.3.2-1)
    [2012-07-04 07:40] upgraded gcc-libs (4.7.1-1 -> 4.7.1-3)
    [2012-07-04 07:40] upgraded gcc (4.7.1-1 -> 4.7.1-3)
    [2012-07-04 07:40] upgraded initscripts (2012.06.2-1 -> 2012.06.3-1)
    [2012-07-04 07:40] upgraded xfce4-fsguard-plugin (1.0.0-3 -> 1.0.1-1)
    [2012-07-04 07:40] upgraded xfce4-cpugraph-plugin (1.0.2-1 -> 1.0.4-1)
    [2012-07-04 07:40] upgraded xfce4-diskperf-plugin (2.5.3-1 -> 2.5.4-1)
    [2012-07-04 07:40] upgraded python2-lxml (2.3.4-1 -> 2.3.4-2)
    [2012-07-04 07:40] upgraded xfce4-battery-plugin (1.0.4-1 -> 1.0.5-1)
    [2012-07-04 07:40] upgraded xfce4-mpc-plugin (0.4.3-1 -> 0.4.4-1)
    [2012-07-04 07:40] upgraded gnutls (3.0.20-1 -> 3.0.21-1)
    [2012-07-04 07:40] upgraded xfce4-systemload-plugin (1.1.0-2 -> 1.1.1-1)
    [2012-07-04 07:40] upgraded libjpeg-turbo (1.2.0-2 -> 1.2.1-1)
    [2012-07-04 07:40] installed python2-beautifulsoup3 (3.2.1-1)
    [2012-07-04 07:40] upgraded calibre (0.8.58-1 -> 0.8.58-4)
    [2012-07-04 07:40] upgraded wine (1.5.7-1 -> 1.5.8-1)
    [2012-07-04 07:40] upgraded lib32-glibc (2.15-10 -> 2.15-11)
    [2012-07-04 07:40] upgraded lib32-gcc-libs (4.7.1-1 -> 4.7.1-3)
    [2012-07-04 08:03] Running 'pacman -S community/winefish'
    [2012-07-04 08:03] installed winefish (1.3.3-11)
    [2012-07-04 18:17] Running 'pacman -U /tmp/yaourt-tmp-photon/PKGDEST.hNP/nosr-git-20120704-1-x86_64.pkg.tar.xz'
    [2012-07-04 18:17] installed nosr-git (20120704-1)
    Another day before:
    [2012-07-02 09:20] upgraded ca-certificates (20120212-1 -> 20120623-1)
    [2012-07-02 09:20] upgraded perl-file-copy-recursive (0.38-1 -> 0.38-2)
    [2012-07-02 09:20] upgraded libdrm (2.4.35-1 -> 2.4.37-1)
    [2012-07-02 09:20] upgraded lib32-libdrm (2.4.35-1 -> 2.4.37-1)
    [2012-07-02 09:21] ----------------------------------------------------------------
    [2012-07-02 09:21] PLEASE NOTE:
    [2012-07-02 09:21] For these drivers to work, you must install kernel modules.
    [2012-07-02 09:21] Depending on your kernel, these module packages are named
    [2012-07-02 09:21] catalyst-$kernel and stock kernel module is catalyst
    [2012-07-02 09:21]
    [2012-07-02 09:21] OR simply use packages that provides auto re-compilation:
    [2012-07-02 09:21] catalyst-hook or catalyst-daemon
    [2012-07-02 09:21]
    [2012-07-02 09:21] OR use catalyst-generator package to generate catalyst-{kernver}
    [2012-07-02 09:21] packages
    [2012-07-02 09:21] ----------------------------------------------------------------
    [2012-07-02 09:21] You can use the tool 'aticonfig' to generate an xorg.conf file.
    [2012-07-02 09:21] --------------------- ^^^^^^^^^ --------------------------------
    [2012-07-02 09:21] Add nomodeset to your kernel line in /boot/grub/menu.lst , ie.:
    [2012-07-02 09:21] kernel /boot/vmlinuz-linux root=/dev/sda1 ro nomodeset
    [2012-07-02 09:21] ----------------------------------------------------------------
    [2012-07-02 09:21] For more info and troubleshooting visit:
    [2012-07-02 09:21] http://wiki.archlinux.org/index.php/ATI_Catalyst
    [2012-07-02 09:21] ----------------------------------------------------------------
    [2012-07-02 09:21] upgraded catalyst-utils (12.4-2 -> 12.6-1)
    [2012-07-02 09:21] Building fglrx module for 3.3.6-1-ARCH kernel ...
    [2012-07-02 09:21] Ok.
    [2012-07-02 09:21] ----------------------------------------------------------------
    [2012-07-02 09:21] Automatic re-compilation is enabled now.
    [2012-07-02 09:21] ----------------------------------------------------------------
    [2012-07-02 09:21] Answer 'Yes' whenever pacman ask you about updating
    [2012-07-02 09:21] 'linux-headers' in first place
    [2012-07-02 09:21] ----------------------------------------------------------------
    [2012-07-02 09:21] Provide headers to your kernel ie:
    [2012-07-02 09:21] linux-headers if you are using linux.
    [2012-07-02 09:21] Most of custom kernels provides own headers.
    [2012-07-02 09:21] ----------------------------------------------------------------
    [2012-07-02 09:21] Add nomodeset to your kernel line in /boot/grub/menu.lst , ie.:
    [2012-07-02 09:21] kernel /boot/vmlinuz-linux root=/dev/sda1 ro nomodeset
    [2012-07-02 09:21] -------------------------------------------- ^^^^^^^^^ ---------
    [2012-07-02 09:21] If experiencing problems with building module or using more than
    [2012-07-02 09:21] one kernel use catalyst_build_module command as root, more info:
    [2012-07-02 09:21] # catalyst_build_module help
    [2012-07-02 09:21] - ^^^^^^^^^^^^^^^^^^^^^ ----------------------------------------
    [2012-07-02 09:21] For more info and more troubleshooting visit:
    [2012-07-02 09:21] http://wiki.archlinux.org/index.php/ATI_Catalyst
    [2012-07-02 09:21] ----------------------------------------------------------------
    [2012-07-02 09:21] upgraded catalyst-hook (12.4-4 -> 12.6-1)
    I must note, that I'm still running kernel 3.3.6-1 since later kernel versions make another problem: https://bbs.archlinux.org/viewtopic.php?id=142174
    I'm using an AMD A4-3400 APU with Catalyst 12.6.
    Thanks for any hints,
    PhotonX
    Last edited by PhotonX (2012-07-24 07:25:40)

    Here some debug output:
    $ compiz --replace --debug --sm-disable --ignore-desktop-hints ccp
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libcore.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /usr/lib/compiz/libcore.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libccp.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libdbus.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libvpswitch.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libresize.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libmousepoll.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libregex.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libdecoration.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libcrashhandler.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libannotate.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libtext.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libgnomecompat.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libplace.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libwobbly.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libmaximumize.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libresizeinfo.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libthumbnail.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libshift.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libobs.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libanimation.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libfade.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libanimationaddon.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libmove.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libopacify.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libcube.so : No such file or directory
    compiz (cube) - Warn: Failed to load slide: freedesktop
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libscale.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/librotate.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/lib3d.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libscaleaddon.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libcubeaddon.so : No such file or directory
    compiz (cubeaddon) - Warn: Failed to load image: fusioncap.png
    compiz (cubeaddon) - Warn: Failed to load image: compizcap.png
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libexpo.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libezoom.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libstaticswitcher.so : No such file or directory
    compiz (core) - Debug: Could not stat() file /home/photon/.compiz/plugins/libbench.so : No such file or directory

  • OSX Lion QuickTime Internet Plug-In causes high CPU load

    I have OSX Lion installed.
    Now I have a CPU load between 80 to 130% caused by the Quicktime internet plug-in if I watch my ip-camera with Safari. Also I get no Audio out of my ip-camera anymore. In SnowLeopard everything was fine, Safari CPU load at 30%. What is wrong ? Can anybody help me ? It is an Y-Cam Knight SD and a MacMini core 2 Duo.
    Karsten Preussner from GERMANY

    I had this same problem and couldn't get it to work at all. I tried to install the 3IVX plugin listed here and it didn't do anything. So I uninstalled it.
    Then I thought to try my Macbook Pro and see if it was working on that computer, sure enough it was. I checked the HD/Library/Quicktime folder and it only had 4 items in it, whereas on the Mac Pro (that was not working) had 19 itmes in there. So, I moved all 19 out to a new folder and copied only the ones that were in the MBP. When I opened Safari IT WORKED!!!  NO MORE PLUGIN FAILURE.
    So, I must have just had too many old things in the quicktime folder that was causing it to fail.
    Here is a screenshot of my HD/Library/Quicktime folder contents.  The top folder shows the 4 items that should be in there (Perian is optional) and the bottom window in the screenshot shows all the stuff I previously had in there which caused the failure.
    So If you are having this plugin failure, try removing all but these essentials from your HD/Library/Quicktime folder.  It worked for me!

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

  • Does the iphone cpu frequency change when the cpu load is different?

    Does the iphone cpu frequency change when the cpu load is different, or it does not change, stay a fixed frequency? if it changes, how can i get the realtime cpu frequency?if anyone knows,please tell me, thank you so much!!!

    As a general, historical statement Tonefox is correct.  For certain particular cpus woodmeister is correct.  Cpus have historically been single frequency units, though over-clocking has been done for several years.  Doing so pushes the cpu beyond its guaranteed speed, but has tended to work since most cpus from quality vendors will actually operate at higher speeds.  The manufacturer just does not guarantee the results...remember the Pentium fiasco in the early years of that chip?  Today manufacturers are ceertifying particular product lines for over-clocking on a periodic basis.  And that is what dynamic clocking really is, over-clocking but not at a constant clock speed as has been done in the past.
    Much of the silicon on the market will function at higher clock rates, the only question is does the maker guarantee the accuracy and performance at those clock rates.

  • CPU Load problem

    I have an iBook G4 800 Mhz processor - 512Mb ram...
    and i'm trying to run ableton live - but the cpu load is too great - and i keep getting glitches in my audio stream - plus it has a cpu meter that goes up to like 86% - 92% when i'm only running 2 tracks which shouldn't be hard for the comp to do...
    would a 1Gb ram chip do the trick? or am i wasting my time and i need to get a powerbook? also are there any tricks to lessening the cpu load?
    thanks for ur help!

    Hi Mesaboogiewes,
    Welcome to Apple Discussions
    Ableton.com recommends disabling Energy Saver, fullscreen mode, and Exposé. I would recommend putting the 1Gb of RAM, you will find a better result. I suggest going to the Ableton.com website and looking for more troubleshooting issues.
    I hope that helps,
    Jon

Maybe you are looking for

  • Get access to a value in a running while (with C++)

    Good morning, I have a serious problem. I run a Vi with a while loop (for acquisition). In this loop, there are many values. I want to access to them while the loop is running. The problem of my VI is it does not give me the value until the loop has

  • Node - Dynamic Attributes

    Hi, I have a node 'CONF' with attribute ATNAM01. I used a ZSTRUC to create this node. Here my requirement is that based on user inputs I will execute a FM, I will get no of entries in my itab. I need to assign attributes based on itab entries to 'CON

  • How do I stop the pop-up window in Facebook that asks "Are you sure you want to navigate away from this page"

    It recently started to ask this every time I do anything on Facebook.

  • Cropping photos at an angle within InDesign?

    Is this possible? I have a bunch of product shots. I want to bring them into InDesign, rotate them until I like the angle, and then crop them (mask out the background) to fit inside a squared-up rectangle border. I know I can do this all individually

  • Delete Request in InfoCube

    I would like to delete all the Request in the InfoCube and do the re-load from ECC6. I right-click InfoCube ->Delete Content, then it will prompt me the following: Do you want to delete the contents of this InfoCube? I click Yes, then it prompt me th