Solved

Reduce CPU Utilization

Posted on 2011-09-13
10
619 Views
Last Modified: 2013-11-27
Dear EE Members

We developed project in Visual Studio 2010 C#.net, to download and upload the thousand files through sftp and update the log the with file name, time stamp and path details for every file in the SQL 2005 database. we are using three timers first one for upload process file, second one for download the process file and third one for download the log file, each timer will access the SQL Database when sending and receiving the file. During this all process CPU Utilization is going more then 80%. How we can reduce this CPU Utilization.

Thanks
0
Comment
Question by:mivbinfotech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 22

Expert Comment

by:eeRoot
ID: 36529248
Is the app multi-threaded or able to make use of multiple CPU cores?  Is it a 32 bit or 64 bit app?  Is the app set up so you can throttle the number of files being processed simultaneously?  There are several options for debugging and tracing through code, I couldn't say which one would be the most useful to you, it depends on how you've structured the code.

http://stackoverflow.com/questions/27610/how-to-add-simple-tracing-in-c
0
 
LVL 15

Expert Comment

by:x77
ID: 36530474
There are a lot of component that can waste CPU on your process.

   - Sftp - What is your Provider ?
   - Update database only 1 time per file ?
   - Have you any method to query remote Directory ?

. Net 2.0 includes a class to transfer files over Ftp.
  It supports also listfiles on remote directory, but when you need also exact dates and sizes it is a bad option (WebRequestMethods.Ftp.GetFileSize and WebRequestMethods.Ftp.GetDateTimestamp very slow).
0
 
LVL 16

Expert Comment

by:SteveJ
ID: 36552550
If you are using a Gb NIC and putting lots of data on the wire you will drive CPU high.
0
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 
LVL 2

Accepted Solution

by:
mivbinfotech earned 0 total points
ID: 37249654
what we did is we separated the SFTP processes and others, so SFTP works only when transferring files and the other relevant processes are separate,    

we have managed to cut CPU time by almost half
0
 
LVL 21

Expert Comment

by:mastoo
ID: 37250354
Follow eeRoot's link or buy a code profiler to get a breakout of where your code spends the most time, rather than even educated guesses.  And I'll add to the guesses that it could be context switching if you have too many threads, or if sql is local it could be the sql.
0
 
LVL 2

Author Closing Comment

by:mivbinfotech
ID: 37290363
solved
0
 
LVL 2

Author Comment

by:mivbinfotech
ID: 37268676
solved
0
 
LVL 16

Expert Comment

by:SteveJ
ID: 37269850
If someone helped, give them points.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question