Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
grid [2018/03/08 18:25] vidra Add info about profiling RAM by `time -v` |
grid [2018/03/09 23:28] vidra [Profiling] |
||
---|---|---|---|
Line 272: | Line 272: | ||
===== Profiling ===== | ===== Profiling ===== | ||
- | As stated above, you should always specify the exact memory limits when running your tasks, so that you neither waste RAM nor starve others of memory by using more that you requested. However, memory requirements can be difficult to estimate in advance. That's why you should profile your tasks first. | + | As stated above, you should always specify the exact memory limits when running your tasks, so that you neither waste RAM nor starve others of memory by using more than you requested. However, memory requirements can be difficult to estimate in advance. That's why you should profile your tasks first. |
- | A simple method is to run the task and observe the memory usage reported in the epilog, but SGE may not record transient allocations. | + | A simple method is to run the task and observe the memory usage reported in the epilog, but SGE may not record transient allocations. |
You can still miss allocations made shortly before the program exits – which often happens when trying to debug why your program gets killed by SGE after exhausting the reserved space. To record these, use ''/ | You can still miss allocations made shortly before the program exits – which often happens when trying to debug why your program gets killed by SGE after exhausting the reserved space. To record these, use ''/ | ||
Line 281: | Line 281: | ||
If you program in C and need to know the peak memory usage of your children, you can also use the '' | If you program in C and need to know the peak memory usage of your children, you can also use the '' | ||
+ | |||
+ | If your job is the only one on a given machine, you can also look how much free memory is left when running the job (e.g. with '' | ||