Reply to topic

[SOLVED] Activities don't free RAM?

User avatar sparhawk
Registered Member
Posts
267
Karma
0
OS

[SOLVED] Activities don't free RAM?

Sat Dec 01, 2012 12:19 am
I love the activities function in KDE, and I especially like the concept of being able to "stop" activities that are not being used.

However, from the output of htop, my understanding is that these processes are paused (i.e. use 0% CPU) while not freeing up any RAM. Is there a way to free the RAM up too? Perhaps by writing it to file or swap? I think that sending a STOP signal to processes has the same effect (i.e. doesn't free RAM).

Cheers.

Last edited by sparhawk on Tue Dec 04, 2012 7:16 am, edited 1 time in total.
User avatar bcooksley
Administrator
Posts
18669
Karma
83
OS

Re: Activities don't free RAM?

Sun Dec 02, 2012 8:36 am
Unfortunately the RAM cannot be freed without killing the applications (ie. forcing them to quit) or performing some form of memory snapshotting (which would require supporting infrastructure from the kernel and would involve operating system specific code). In either case this would make resuming the activity take quite a long time.


System Settings and Device Actions KCM maintainer
Image
User avatar sparhawk
Registered Member
Posts
267
Karma
0
OS

Re: Activities don't free RAM?

Mon Dec 03, 2012 12:57 am
Hmm... You've inspired me with some new words to google, so I've found out a bit more about this.

It seems that "undemanding" processes will be moved to swap when there is enough pressure for more memory. It also seems that one can use a utility called cryopid2 that can manually freeze the memory of processes to swap. AFAIK this doesn't require kernel-level support. I agree that it might make stopping activities a bit slower, but I feel it might be a useful option to have in KDE?
User avatar ivan
KDE Developer
Posts
771
Karma
13
OS

Re: Activities don't free RAM?  Topic is solved

Mon Dec 03, 2012 7:38 am
CryoPID has problems, especially with GUI applications.

Honestly, I've always seen it more as a proof of concept, that anything serious. Process management should be in the kernel, and, like regular hibernation, process hibernation should go there as well.

This is something I'd like to see in the infrastructure and definitely would do my best to make kamd use it - it would be much better than the x-session protocol we support nowadays.

Mind that this would not be able to cover applications that span across multiple activities.

--
p.s. There is one more thing worth noting - it is a policy of the kernel to take as much RAM as possible - if not for applications, then for caches etc. In an optimal system, the occupied memory should always be ~95%. There is no point in freeing up memory (especially to swap/hard disk) if it is not needed immediately.


Image
User avatar sparhawk
Registered Member
Posts
267
Karma
0
OS

Re: Activities don't free RAM?

Tue Dec 04, 2012 7:16 am
Okay, thanks for that information. In a real-world situation, I've not really seen how performance copes with the auto-swapping, so I'll just leave everything as is, and see how we go. Thanks for the replies.

 
Reply to topic

Bookmarks



Who is online

Registered users: AElfwine, alake, anditosan, Artmessiah, Baidu [Spider], Bing [Bot], edmael, Exabot [Bot], garthecho, geaplanet, Google [Bot], google01103, Horus, inksi, Joif, ken300, La Ninje, lazyit, pedrorodriguez, pvonz, thalesgava, tienhung, VP1986, Yahoo [Bot]