Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. monitor.wait/pulse CPUusage

monitor.wait/pulse CPUusage

Scheduled Pinned Locked Moved Visual Basic
csharpasp-netdotnetquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RJGCarey
    wrote on last edited by
    #1

    I have a Visual Basic application that processes stock market data. It receives UDP packets from a satellite disc receiver and decodes the highly compressed data, creates and saves to file millions of 20 byte "ticks", builds one minute bar charting data, and then screens each tick for certain patterns. Since it is looking at 7800 stocks and processes about 85 million ticks a day, it is a very busy application. It runs on a home built computer with an ASUS motherboard, an AMD Athlon 64x2 Dual Core Processor 4400+, 2.00 GB RAM, and WINXP Pro. When I converted it from VB.6 to VB.Net 2003 I chose to use thread.suspend/resume code to synchronize the many threads. I was surprized and pleased to see that at the heaviest data load periods that Task Manager showed it using only 12% CPU capacity. When I converted it to VB.Net 2005 I discovered that thread.suspend/resume code had been depreciated. I chose to replace it with monitor.wait/pulse code. I was surprized and disappointed to see that Task Manager now shows it using 86% CPU capacity at peak periods. Is it possible that Task Manager runs differently in .Net Framework 1.1 and 2.0 and was showing me erroneous info in 1.1? Does monitor.wait/pulse code use alot more CPU cycles? Does anyone know about CPU overhead of the several other thread synchronizatiion methods? Thanks RCarey

    RCarey

    B 1 Reply Last reply
    0
    • R RJGCarey

      I have a Visual Basic application that processes stock market data. It receives UDP packets from a satellite disc receiver and decodes the highly compressed data, creates and saves to file millions of 20 byte "ticks", builds one minute bar charting data, and then screens each tick for certain patterns. Since it is looking at 7800 stocks and processes about 85 million ticks a day, it is a very busy application. It runs on a home built computer with an ASUS motherboard, an AMD Athlon 64x2 Dual Core Processor 4400+, 2.00 GB RAM, and WINXP Pro. When I converted it from VB.6 to VB.Net 2003 I chose to use thread.suspend/resume code to synchronize the many threads. I was surprized and pleased to see that at the heaviest data load periods that Task Manager showed it using only 12% CPU capacity. When I converted it to VB.Net 2005 I discovered that thread.suspend/resume code had been depreciated. I chose to replace it with monitor.wait/pulse code. I was surprized and disappointed to see that Task Manager now shows it using 86% CPU capacity at peak periods. Is it possible that Task Manager runs differently in .Net Framework 1.1 and 2.0 and was showing me erroneous info in 1.1? Does monitor.wait/pulse code use alot more CPU cycles? Does anyone know about CPU overhead of the several other thread synchronizatiion methods? Thanks RCarey

      RCarey

      B Offline
      B Offline
      Besir Kasami
      wrote on last edited by
      #2

      Hello Ms. RCarey. I´m an young developer (MCTS Windows Developer with VB.Net 2005). I havent been in situation like yours, and I can´t just tell you what to do. I can only say that you should view and study this page and based on your situation choose what is the best for your application. Read this http://msdn2.microsoft.com/en-us/library/fxy8dte8(VS.80).aspx[^] You should also use Visual Studion For Testers to test the performance in the several situations of your application in order to achieve your goal. Sincerelly B.K. alias ~Frenki~

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups