| | |
understanding role of ntdll in profiling results
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2009
Posts: 2
Reputation:
Solved Threads: 0
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.
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.
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?
Does your hard disk get much usage while the program is running?
dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
•
•
Join Date: Aug 2009
Posts: 2
Reputation:
Solved Threads: 0
•
•
•
•
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?
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.
![]() |
Similar Threads
- Resume of CEO (Post your Resume)
- C++ Generic Programming? (C++)
- SEO Domain name question (Search Engine Optimization)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- CSS not displaying properly (HTML and CSS)
- printing webpages (JavaScript / DHTML / AJAX)
- browser incompatibility? page wont finish loading (JavaScript / DHTML / AJAX)
- Interactive Strategist - NYC - Advertising Agency (Internet Marketing Job Offers)
- Do you need AV and Firewall? (Windows NT / 2000 / XP)
Other Threads in the C Forum
- Previous Thread: how to copy an array to a file?
- Next Thread: Want to write a C program to copy from a specified place of a String.
| Thread Tools | Search this Thread |
adobe api array arrays binarysearch calculate char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators initialization iso kernel kilometer km linked linkedlist linux linuxsegmentationfault list lists locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql odf open opensource openwebfoundation owf pattern pdf performance pointer pointers posix power probleminc program programming pyramidusingturboccodes read recursion recv recvblocked repetition research scanf scheduling scripting segmentationfault send shape socketprograming socketprogramming stack standard string suggestions systemcall test testautomation unix urboc user voidmain() wab win32api windows.h





