profiling

Celery tasks profiling

依然范特西╮ 提交于 2021-02-07 06:24:09
问题 As I can see in top utility celery procecess consume a lot of CPU time. So I want to profile it. I can do it manually on developer machine like so: python -m cProfile -o test-`date +%Y-%m-%d-%T`.prof ./manage.py celeryd -B But to have accurate timings I need to profile it on production machine. On that machine (Fedora 14) celery is launched by init scripts. E.g. service celeryd start I have figured out these scripts eventually call manage.py celeryd_multi eventually. So my question is how can

Profiling my program with linux perf and different call graph modes gives different results

不想你离开。 提交于 2021-02-07 04:35:13
问题 I want to profile my c++ program with linux perf. For this I used the three following commands and I do not understand why I get three completely different reports. perf record --call-graph dwarf ./myProg perf report perf record --call-graph fp ./myProg perf report perf record --call-graph lbr ./myProg perf report Also I do not understand why the main function is not the highest function in the list. The logic of my program is the following, the main function calls the getPogDocumentFromFile

Why might std::vector be faster than a raw dynamically allocated array?

不羁的心 提交于 2021-02-06 13:54:57
问题 The result of a discussion with a colleague I ended up writing benchmarks to test std::vector vs raw dynamically allocated arrays, and ended up with a surprise. My tests are as follows: #include "testconsts.h" // defines NUM_INTS across all tests #include <vector> int main() { const int numInts = NUM_INTS; std::vector<int> intVector( numInts ); int * const intArray = new int[ numInts ]; ++intVector[0]; // force access to affect optimization ++intArray[0]; // force access to affect

Why might std::vector be faster than a raw dynamically allocated array?

狂风中的少年 提交于 2021-02-06 13:52:35
问题 The result of a discussion with a colleague I ended up writing benchmarks to test std::vector vs raw dynamically allocated arrays, and ended up with a surprise. My tests are as follows: #include "testconsts.h" // defines NUM_INTS across all tests #include <vector> int main() { const int numInts = NUM_INTS; std::vector<int> intVector( numInts ); int * const intArray = new int[ numInts ]; ++intVector[0]; // force access to affect optimization ++intArray[0]; // force access to affect

Celery - minimize memory consumption

牧云@^-^@ 提交于 2021-02-04 12:18:06
问题 We have ~300 celeryd processes running under Ubuntu 10.4 64-bit , in idle every process takes ~19mb RES, ~174mb VIRT, thus - it's around 6GB of RAM in idle for all processes. In active state - process takes up to 100mb of RES and ~300mb VIRT Every process uses minidom(xml files are < 500kb, simple structure) and urllib. Quetions is - how can we decrease RAM consuption - at least for idle workers, probably some celery or python options may help? How to determine which part takes most of memory

View gprof output in kcachegrind

不问归期 提交于 2021-02-04 05:55:53
问题 How to view output of gprof in kcachegrind? Is here a converter from gcc's gmon.out into callgrind.out? 回答1: Currently, this seems not to be supported. It is mentioned on Kcachegrind's whishlist, though. 来源: https://stackoverflow.com/questions/7274095/view-gprof-output-in-kcachegrind

Auto save profiler snapshots in visualVM

橙三吉。 提交于 2021-01-28 01:58:07
问题 Is it possible to configure VisualVM to automatically save snapshots/history of every java application that is running for both the monitor and the profiler tabs? I have several applications that run on a nightly basis, and I would like to collect the profiler and the monitor information about them from VisualVM for additional evaluation the morning after they run. I tried to find some plugins to VisualVM, and also tried to find a way to configure it in eclipse and use it in JUnits, but I

What time unit is used in the Visual Studio 2010 instrumentation profiler?

谁说我不能喝 提交于 2021-01-27 15:57:03
问题 The profiler in Visual Studio 2010 is great and all, but I can't see what unit the time results in the instrumentation profiler is reported in. The results table is just numbers and I can't find anywhere in the UI where I can set the unit (as there is in e.g. AQTime). I've read through the "Understanding Instrumentation Data" section on MSDN but it just uses time to explain the numbers. ( "The total time that was spent executing..." ) Does anyone know what unit (milliseconds, microseconds,

Which is the best replacement for KProf?

左心房为你撑大大i 提交于 2021-01-27 13:34:46
问题 I'm searching for a "good enough" gprof output visualizer. Kprof seems unmaintained. Profiling is an important part of (speed sensitive) applications development, but I fail to find support on the major Linux IDEs. Any suggestions ? 回答1: I recommend using KCachegrind to vizualize the logs given by oprofile. 回答2: Probably not what you're looking for, but for me, gprof with an editor with decent search does the job. Are you looking for in what case the top X functions are called so you can

Perf stat equivalent for Mac OS?

╄→尐↘猪︶ㄣ 提交于 2021-01-24 07:14:15
问题 Is there a perf stat equivalent on Mac OS? I would like to do the same thing for a CLI command and googling is not yielding anything. 回答1: There was Instruments tool in Mac OS X to profile applications including with hardware PMU. Default is to do sampling profiler for CPU usage. Some docs: https://en.wikipedia.org/wiki/Instruments_(software) https://help.apple.com/instruments/mac/current/ It also has command line variant: https://help.apple.com/instruments/mac/current/#/devb14ffaa5 Open