, I use the Microsoft-provided process Explorer v15.3Http://technet.microsoft.com/en-us/sysinternals/bb896653.aspxUnzip run after downloadRight-click the process you want to see---properties4. Then select the Threads tab to find the TID for the CPU-consuming thread, for example, I'm a 31876 thread here.5. Convert the PID into 16, I am here directly with the system of the calculator conversion, placed on why to convert, because the previous information
When you run a complex Python program, the execution time is long, and you might want to improve the execution efficiency of your program. But what should we do?
First, there is a tool that detects bottlenecks in your code, for example, to find out which part of the execution time is longer. Next, it is optimized for this part.
At the same time, you need to control memory and
When running a complex Python program, it can take a long time to execute, and you may want to increase the execution efficiency of your program. But what should we do?
First, there is a tool that can detect bottlenecks in your code, for example, to find out which part of the execution time is relatively long. Next, optimize for this section.
At the same time, you need to control memory and
At present our monitoring can find the process that consumes the higher CPU (the threshold is 3 CPU), through monitoring we can find the process number that consumes the higher CPU;With the process number PID, we can display the CPU resource consumption of each thread in the process via the Top–h–p Then, through the Th
%runtime.mach_semaphore_timedwait0 0.0%100.0%7 77.8%System0 0.0%100.0%1 11.1%Notetsleep0 0.0%100.0%1 11.1% Ready0 0.0%100.0%2 22.2%runtime.gosched00 0.0%100.0%1 11.1%Runtime.mach_semrelease0 0.0%100.0%1 11.1%RUNTIME.NOTETSLEEPG (pprof) Webtotal:9samplesloading Web page file:////var/folders/2l/195zcc1n0sn2wjfjwf9hl9d80000gn/t/slfuzhzbdb.0.svgWeb commands generate cool SVG images that are opened in a browser.In addition to remote pull, you can write your own code to write this da
arseclientmsg_normal ()#3 0x000000000051ef55 in Channeltask::p arseclientmsg ()#4 0x000000000051f070 in Channeltask::cmdmsgparse_forward ()#5 0x000000000051f1d1 in Channeltask::cmdmsgparse ()#6 0x000000000051f414 in Channeltask::p rocesscmd ()#7 0x0000000000523ea8 in Channeltaskmanager::p rocesscmd ()#8 0x0000000000525ddd in Channeltimetick::run ()#9 0x00000000005e9d29 in Zthread::threadfunc ()#10 0x00000039c6106137 in Start_thread () from/lib64/tls/libpthread.so.0#11 0x00000039c5ac9883 in Clon
% RUNTIME.NOTETSLEEPG (pprof) webtotal:9 samplesloading Web page file:////var/folders/2l/ 195zcc1n0sn2wjfjwf9hl9d80000gn/t/slfuzhzbdb.0.svgWeb commands generate cool SVG images that are opened in a browser.In addition to remote pull, you can write your own code to write this data to a file (implementing several routes in the net/http/pprof, turning tracing information on or off).For specific reference: Http://blog.golang.org/profiling-go-programsHttps://github.com/hyper-carrot/go_command_tutoria
This is a creation in
Article, where the information may have evolved or changed.
Pprof is a god horse thing?
Pprof-manual page for Pprof (part of Gperftools)
is part of the Gperftools tool.
What is Gperftools again?
These tools is for use by developers so, they can create more robust applications. Especially of use to those developing multi-threaded applications in C + + with templates. Includes Tcmalloc, Heap-checker, Heap-profiler and Cpu-profiler.
Original source:Http://www.blogjava.net/hankchenPhenomenon:Deploying Java Web Applications in Tomcat, the Java process that appeared after Tomcat for a period of time continued to consume up to 100% of the CPU, causing Web program access to be blocked.Possible cause Analysis:It is possible that the program is actually doing data calculations, or the
1) First use top to find out which thread occupies the CPU#topView the process number for CPU 100%, such as process number 16459#top-H-P 16459And then see which PID is higher to find the PID 100% CPUPID USER PR NI VIRT RES SHR S%cpu%MEM time+ COMMAND16539 Root 0 1673m 525m 10m R 98.9 13.3 6:36.83 java16462 Root 0 1673m 525m 10m S 1.0 13.3 0:04.07 java16463 Root 0
Requirement: colleagues report that the server is difficult to log on to the terminal every afternoon and does not respond for a long time.After investigation, the shengteng terminal binding program and each terminal have a large number of invalid connections (Perl obtains the external IP information connecting to the local machine). Even if the resources occupied by the terminal offline are not released, the next connection recreates a new connection
CUDA program Run CPU 100% problem is a bit of a headache, in the experimental process called the kernel function, and then call Cudamemcpyasync, but now there will be a block in this so-called Async api,strace followed a bit, Found that 99.999% were allClock_gettime (Clock_monotonic_raw, {2461, 485666623}) = 0So there's an inspiration, why don't I write a similar poll function, but I'm polling every 1 minut
In Linux, when the CPU usage reaches 100%, you can also run the program-general Linux technology-Linux technology and application information. The following is a detailed description. If it is Windows, the system will slow down, and then wait for you to go to the K program or restart, but the program can still run in L
First, the problem found
In a test or production environment, when the Tomcat CPU is found to remain at a certain high level, the program processing is definitely out of the question, the next step is to find out why. The following figure shows that tomcat with a process ID of 8051 occupies a high CPU.
second, positioning problems
Use the command ps-mp 8051-o
The previous section describes how to control the CPU usage through simple cyclic operations. Link: www.2cto.com/kf/201110/425456.html
However, by calling the GetTickCount () function of the system, you can obtain the current time value from the system startup. This time value can also be used to control the busy time slice and idle time slice of the system. Let the system keep repeating a time slice, and sleep a time slice. In this way, after a secon
Yesterday, the leaders told the customer that they needed a script to test CPU performance. to simplify the problem, they wanted to create a program that could manually set CPU consumption. I thought there was such a script, maybe the performance testing tool is still similar. After thinking about it, it may be possible to use an endless loop to achieve similar r
1: View all process pid through the JPS command.2: Use top-p PID to view the CPU and memory and load of the process for the PID you are looking forUse top-p pid-h to view CPU-intensive queries for each threadIf you find that a certain PID CPU is too high, you can get this PID into 16 binaryFor example, PID 12760 is converted to 16 binary 31d8, uppercase to lowerc
{time. Sleep (Time.millisecond* -) Counter++}WG. Done ()}
2. Compile and run the program
Go Build Trace_example.go
./trace_example
3. Access via browser
http://localhost:6060/debug/pprof/
Ability to view the overview of a program
4. You can also use the terminal command to view
Then use the Pprof tool-to-look at the heap profile:
Go Tool pprof Http://localhost:6060/debug/pprof/heap
Or to the look in a 3
How to use Jstack to pinpoint the exception code (Java program CPU utilization is high)Please jstack artifact to helpThis paper introduces the secret of using Jstack location problem in Linux environment.S1. "Top command" to find a process with high CPU utilization, get [process number], where PID is 1289112891S2. "PS P 12891-l-o pcpu,pid,tid,time,tname,cmd comma
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.