943,840 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 349
  • C RSS
Aug 31st, 2009
0

understanding role of ntdll in profiling results

Expand Post »
Dear Community Members!

I have written a program in plain C to carry out some mathematical calculations. Now I am trying to identify bottlenecks using a profiler (IDE: Open Watcom 1.8). I find that a very large portion (60-79%) of the running time is used by ntdll.dll. The core program and the few called dlls consume just a smaller portion. The profiler does not show anything inside ntdll.

As I am not a programmer (just an olap developer doing some programming on my own) I do not fully understand what this means. Google has told me it is some very basic windows dll. But why does it take so much time? First I thought it is becaue I printed some information on the screen for testing purposes but commenting out the printf-s and leaving just the calculations has not changed the situation.

Is there a possibility to improve the performance of my program somehow? Or is it normal? What does ntdll.dll do?

Thanks, S.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
stromgren is offline Offline
2 posts
since Aug 2009
Aug 31st, 2009
0

Re: understanding role of ntdll in profiling results

This page says that ntdll.dll is "a Native API file of Microsoft operating systems and it contains NT kernel functions". Kind of vague, but perhaps if the code is doing any system calls (accessing files, perhaps), that may account for it. Or perhaps if your program uses a lot of memory, some virtual memory software may be kicking in to move your data from disk to RAM periodically.

Does your hard disk get much usage while the program is running?
Reputation Points: 185
Solved Threads: 28
Posting Whiz in Training
dwks is offline Offline
269 posts
since Nov 2005
Sep 1st, 2009
0

Re: understanding role of ntdll in profiling results

Click to Expand / Collapse  Quote originally posted by dwks ...
This page says that ntdll.dll is "a Native API file of Microsoft operating systems and it contains NT kernel functions". Kind of vague, but perhaps if the code is doing any system calls (accessing files, perhaps), that may account for it. Or perhaps if your program uses a lot of memory, some virtual memory software may be kicking in to move your data from disk to RAM periodically.

Does your hard disk get much usage while the program is running?
Hello DWKS! Thank You for your answer.

You have the point. I watched Process Explorer during a long series of repeated running of my program. I saw a lot of page faults. So that slowed down my program.
It turned out that the lpsolve 5.5 's dll, more exactly the solution of the linear programming model produced the large number of page faults. Putting that line into comment dropped the % portion of the ntdll in the running time. So my original problem is solved, but I am not so happy having found that an outer party dll causes everything. I do not see yet how it can be influenced.

Anyway, you showed the right way, thanks again.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
stromgren is offline Offline
2 posts
since Aug 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: how to copy an array to a file?
Next Thread in C Forum Timeline: Want to write a C program to copy from a specified place of a String.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC