Hello, Again, if it is too big effort to find the sources and go through them, you could quickly take a look at Murphy system-monitor readme:
https://review.tizen.org/gerrit/gitweb?p=profile/ivi/murphy.git;a=blob;f=src/plugins/system-monitor/README.system-monitor;h=4eef436deca0734f1cc57bb29b7653fa653513cf;hb=refs/heads/tizen I guess you have to be logged into gerrit to see it. br, Jaska ________________________________________ From: Dev [dev-boun...@lists.tizen.org] on behalf of Litkey, Krisztian [krisztian.lit...@intel.com] Sent: Tuesday, December 02, 2014 1:54 PM To: ty317....@samsung.com Cc: dev@lists.tizen.org Subject: Re: [Dev] [DEV][RFC] Resource management daemon On Tue, 2014-12-02 at 08:21 +0000, 김태영 wrote: > Hello? I'm Taeyoung Kim. Hello, > We know that Tizen should have a module who handles system resources > such as system memory and netwrok traffic. Thus I want to suggest > the resource daemon (resourced) to handle these kinds of resources. Have you had the opportunity to take a look at Murphy, the resource policy daemon used in the Tizen IVI profile ? If you haven't, could you please take a look at it and especially the Murphy system-monitor plugin ? For a very brief introduction, Murphy is the resource policy management framework used in the Tizen IVI profile. It provides a modular and configurable decision engine/daemon for implementing, and ideally enforcing, system-wide policies. It is designed to handle multiple policy domains and cross-domain policies, to handle situations where the state and changes in one policy domain have effects on other domains. It also provides a client API for applications to interact with and affect the decision-making logic. The decision making logic can also be scripted at will. Murphy comes with a set of plugins that already implement some configurable policies, mostly in the audio and video/screen-usage domain, which is what Murphy is primarily used for in Tizen IVI. The existing functionality can be extended by adding new plugins. Similary, unnecessary functionality can be left out by removing the undesired plugins. One of the plugins provided by Murphy is the system-monitor plugin for monitoring CPU and memory usage. It also provides abstractions for cgroups, and thus can be used to enforce cgroups-based CPU- and memory-usage policies. It also has support for the freezer cgroup subsystem, and embrionic support for net_cls. It seems to me that many of the mechanisms necessary for implementing a majority of the functionality you describe below are already provided by the system-monitor plugin. It would be nice if you could take a look at it and if we could discuss what the gaps are. We'd be interested in addressing all the shortcomings and take a look at how we could implement the necessary policies using our framework. Cheers, Krisztian > > The followings are the main features of resourced. > > > > 1) Memory management > - resourced monitors memory status of system. > - If available memory size is low, resourced notices the situation > for applications > to release memory not used, or swaps out compressed pages of > background processes to RAM (zram). > - If available memory size is very low so that the system would not > be stable (in case of OOM), > resourced terminates some applications to secure available memory > size for the system stability. > - Memory cgroup is used for the memory management. All processes are > grouped according to > the state of the processes (foreground, background, and swapped > processes). The states of > the processes are used as a criterion for the swapping out and > terminating processes. > > > > 2) Network monitoring > - resourced monitors network usages of applications. > - Network usages for all applications are accounted and shows the > usages to Users > - Users can restrict their network usages not to cost a bomb. > - Users and ISPs can allow to use network for just a few application > which they want. > (ex. Map service during roaming, Messages for emergency situation) > - net_cls cgroup is used to categorize processes as a same service, > and netfilter is used > for the network monitoring and accounting. The data traffic is > restricted by iptables > with cgroup extention. > > resourced will use the git path: platform/core/system/resourced > If you have any opinions or questions, Let me know. > > > Thank you. > > - Taeyoung Kim - > > > > > > Taeyoung, Kim | SW Engineer > > System S/W Lab./ S/W Platform Team > > Software R&D Center > > SAMSUNG ELECTRONICS CO., LTD. > > Mobile +82.10.5133.9902 > > E_mail ty317....@samsung.com > > > > > > > > _______________________________________________ > Dev mailing list > Dev@lists.tizen.org > https://lists.tizen.org/listinfo/dev --------------------------------------------------------------------- Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. _______________________________________________ Dev mailing list Dev@lists.tizen.org https://lists.tizen.org/listinfo/dev --------------------------------------------------------------------- Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. _______________________________________________ Dev mailing list Dev@lists.tizen.org https://lists.tizen.org/listinfo/dev