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 have many truecrypt containers that contain random files that I am trying to consolidate into another set of containers that are better organized this time.

To do this requires me to copy all the contents of every container that I have into a central location where I can better categorize these files.

While carrying out this operation, I have noticed that as I read contents from a mounted container, my available physical memory falls linearly until available is consumed.

This physical memory is released/made available only when I dismount the container(s).

Hence it appears to me that the truecrypt driver itself is caching file contents of the container(s) in memory with the expectation that once a file is read, it will be again sometime in the future (which is very incorrect in my use case as I don't read the file again once it's been read from the container and copied to another drive).

Because all available physical memory is consumed by truecrypt, I find it very difficult to use my computer until I dismount the volume, and I have 16GB DDR3 RAM on my system!.

I don't want truecrypt to consume all available physical memory - how do I make it consume a fraction (0.5, 0.7, etc) of available physical memory instead?

Using Windows 7 SP1, x64.

share|improve this question
    
You're not running Windows 8 by any chance are you? –  Sam Dec 31 '12 at 4:15
    
Yes, please identify the specific operating system and vendor distribution you are using? Without this information an accurate answer is not very likely. –  mdpc Dec 31 '12 at 4:19
    
Windows 7 SP1, x64 –  PoorLuzer Dec 31 '12 at 7:16
    
You kind of didn't describe the problem at all. You say "I find it very difficult to use my computer", but you don't say why. What actual problem do you have? Are some operations slow? Are you getting error messages? –  David Schwartz Dec 31 '12 at 7:21
1  
@PoorLuzer: That's not how memory works on any modern operating system. Modern operating systems can allow physical memory to be used for whatever is the most efficient use of that memory at any particular time. If you need to play a game, physical memory will rapidly be reassigned to the game and the cached data will be discarded. (Under memory pressure, memory is taken from whatever is making the least important use of it. Memory need not be wasted to be used.) See this answer which discusses a similar issue. –  David Schwartz Dec 31 '12 at 18:36

1 Answer 1

Modern operating systems do not need memory to be free. They can directly switch memory from one use to another. So there is no harm in having almost all of your physical memory in use. It will still be just as available should you want to use it for something else later.

You are thinking "I want that memory to be free now so I can use it later". But that really doesn't make any sense. Memory doesn't need to be free now to be used later. If some application needs 4GB of memory in a minute, the operating system will give it those 4GB whether or not they are free now. You can use that memory now for one thing and use it for something else later. You don't have to make sacrifices. You can have a huge cache now and throw it away in a split second should your system's memory needs change.

If you are having some actual performance problem, describe it. But modern operating systems go out of their way not to waste memory by having it just sitting around doing nothing. If there's anything they can possibly use it for, they do.

The analogy I use is a guy who walks into a factory where everyone is working and asks, "Why aren't there a bunch of employees sitting on the couch doing nothing just in case there's some work that needs to be done later?" And the answer is -- because there's work to be done now. If there's work to be done later, then they'll do that work later. They don't need to be sitting on the couch doing nothing now just so they can work later. They can work now and later. There is no need to make sacrifices.

share|improve this answer
1  
Isn't there's a difference between the OS caching memory (good) and an app using a huge bunch of memory (possibly bad)? At the least, loading another big app will force the OS to swap data to disk which will cause some slowdows. The OS isn't going to simply discard an app's data like it does for its own cache. SQL server is a notable exception: you can let it use all your ram, but it will release it if an app or the OS requests memory. Most applications don't do that, do they. (Note: It's not clear from OP whether he's refering to OS cache usage or actual app usage.) –  mtone Jan 1 '13 at 0:57
    
@mtone: Properly-designed applications that use large amounts of caching arrange with the operating system to manage the amount of cache the application uses. Only a horribly broken design would require large amounts of memory to sit idle if there was anything useful that memory could do. –  David Schwartz Jan 1 '13 at 2:04
    
Heed mtone's comment - the memory is not being used directly by Win7 but consumed by TrueCrypt and a lot of thrashing is happening when I load another program after TrueCrypt. Hence, either I will need to load the game first and then TrueCrypt (it has less memory to consume) or wait an eternity for the game to load (as thrashing is happening). Issue is "truecrypt's consuming all available physical memory"; if you insist, I am considering rephrasing it to "truecrypt's consuming all available physical memory and it ain't play nice with others when they want a piece of it" –  PoorLuzer Jan 1 '13 at 3:21
    
TrueCrypt, from the behaviors I am seeing is one of those "Only a horribly broken design would require large amounts of memory to sit idle if there was anything useful that memory could do" that you mention. What tools can I run so that we can have some reports to look at what's going on? –  PoorLuzer Jan 1 '13 at 3:23
    
If that was true, there would be dozens of complaints about it. Yet this is the only one I see. That suggests the problem is more likely something unusual about your particular case. –  David Schwartz Jan 1 '13 at 19:37

protected by Community Aug 15 '13 at 17:35

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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