jeetsukumaran / Syrupy

System Resource Usage Profiler
http://jeetworks.org/programs/syrupy
GNU General Public License v3.0
194 stars 26 forks source link

Can we measure the total memory used by a program with parallel computing? #12

Open YaohuiZeng opened 7 years ago

YaohuiZeng commented 7 years ago

Thanks for this handy app, @jeetsukumaran . I am just wondering whether it can measure the total memory used by a program which runs in parallel (4 threads, for example). Thank you!

jeetsukumaran commented 7 years ago

Yes, that is correct --- i.e., it currently only tracks a single process. It is possible to modify it to track multiple processes as long as all the processes run on the same machine. Possible, and probably straightforward technically ... but, unfortunately, tedious. This would involve changes to the user interface to be able to specify those processes, and, on the back end, modification of the various collection routines, etc.

A more immediate work-around might be to use the "-c/--poll-command" option to specify a regular-expression that matches the name of the processes launched by program that you want to monitor. As long as the names are similar enough to each other, yet unique with respect to all other processes running, and your reg-exp fu is up to the task, this should get you a lot of what you want. However, this will still report the resource usage of each individual process, rather the sum of all the processes at any point in time.

More clunky would be to launch a separate instance of Syrupy for every thread to monitor, and then concatenate the files (using colbind instead of rbind to associate samples taken roughly at the same time if that would be useful).

On 12/9/16 5:57 PM, Yaohui Zeng wrote:

Thanks for this handy app, @jeetsukumaran https://github.com/jeetsukumaran . I am just wondering whether it can measure the total memory used by a program which runs in parallel (4 threads, for example). Thank you!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeetsukumaran/Syrupy/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/AABmR1n8nikVv5BXBLaO1LxTlON0GaM8ks5rGdzbgaJpZM4LJcVu.

--


Jeet Sukumaran

jeetsukumaran@gmail.com

Blog/Personal Pages: http://jeetworks.org/ GitHub Repositories: http://github.com/jeetsukumaran Photographs (as stream): http://www.flickr.com/photos/jeetsukumaran/ Photographs (by galleries): http://www.flickr.com/photos/jeetsukumaran/sets/

YaohuiZeng commented 7 years ago

Thanks for your detailed explanation, @jeetsukumaran !