Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i found that when i switch form a windows base application installed by wine to any other application it performs poor so i thinks it might be due to lack or not proper functioning of memory cleaning in Ubuntu

Is there any mean or software by which i could clear my memory after i quit a widows application in Linux

Is there any software like cc cleaner for Ubuntu

share|improve this question

migrated from stackoverflow.com Jan 3 '12 at 12:07

This question came from our site for professional and enthusiast programmers.

    
Did you consider that Photoshop may eat so much memory and you just don't have enough? –  jørgensen Jan 3 '12 at 10:45
    
i didnt mean that but actually when i runs windows software like photoshop and dreamweaver or MS-OFFICE and then switch to netbeans its performance degraded so thats why i belive that may be my OS ubuntu 10.04 might not abel to clean the memory properly. –  HelpMeToAskQuestions Jan 3 '12 at 11:06
    
i have 2Gb of RAM and using 2GB swap but it then also hangs after so therefore i need to know about a mechanism which can clear my memory –  HelpMeToAskQuestions Jan 3 '12 at 11:08
    
why dont you try running ubuntu VM on Windows instead... since you are using windows apps mostly and then ubuntu... for whatever other reason –  ppumkin Jan 3 '12 at 12:20

2 Answers 2

up vote 1 down vote accepted

You do not need to clear the memory or anything else on Linux after an application terminates - I suspect it's the same on Windows but I wouldn't really know.

Since you do not provide any useful information in your question, such as the amount of physical memory on your system or how you came up with the idea that the memory needs to be "cleaned", I can only take a few of shots in the dark:

  • When a WINE application terminates you may occasionally have a remaining wineserver process which can consume both CPU and memory resources, thus slowing down any other application. That process handles, among other things, cross-application shared resources in the WINE environment.

    If you want to completely terminate the WINE session, you can try terminating the wineserver process manually. Keep in mind that you may lose the contents of the WINE clipboard if you do that.

  • If you use an application - any application, not just under WINE - with significant memory requirements (Photoshop comes to mind) for medium to long amounts of time, the Linux kernel will slowly swap out to the disk the memory pages used by the other applications to free more RAM for the current application.

    Once you start using those applications again, the memory pages that were swapped out will need to be retrieved from the disk, which will slow them down for some time.

    This kind of slow down will recede after while, as more and more memory pages are placed back into the main memory.

  • It is possible for a stalled wine process to remain, despite the application being terminated. You should check the running processes for any remnants.

In any case you should monitor your system with a CPU and memory usage monitor before coming up with any conclusion regarding the cause of a slow down - htop is a quite useful tool for this. Look for processes that use too much CPU time or too much memory. Using an I/O monitor or watching the disk LED for activity may also provide useful hints.

EDIT:

I just saw your comments - 2GB of RAM is on the low end these days, both for image processing and for an IDE such as NetBeans. You are bound to experience extensive memory swapping which will slow down things noticeably, especially when you switch from one application to another.

share|improve this answer

You can get the secure the package with "sudo aptitude install secure-delete" and try the "Secure memory wiper; used to wipe traces of data from your computer's memory (RAM)" command. If this doesn't work you can free the swap space by doing:

swapoff /swap/device-or-file(such as /dev/sda2)

then

swapon /swap/device-or-file
share|improve this answer
1  
A very bad idea if you don't have enough memory to hold the data in memory + swap. The kernel's OOM killer will then shut down userspace applications to free memory. –  knittl Jan 3 '12 at 12:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.