View Full Version : memory fragmentation?
A local tech article I read today stated that "as computers run, their memory becomes fragmented, causing the computer to run slower and slower."
Is this really true? I had never heard about "ram fragmentation" as an issue before.
sheila
10-03-2005, 11:43 PM
I would have to imagine that when they say "memory" in that sense, that they are referring to the hard drive. Technically the hard drive is also a type of memory. It is a somewhat odd usage of the term nowadays, though.
Kevin
10-04-2005, 12:36 AM
I have heard this before but I have never seen any hard proof of it causing any slowness at all. Since modern memory has an access time of less than 10 nanoseconds I suspect that defragmenting your RAM would be about as effective at improving performance as removing the rubber coating from the gas pedal in your car. :clown:
On the other hand it is true that on many modern opperating systems including Linux once something is pushed into swap it isn't pulled back out until it is needed again. Therefore it is possible to have lots of stuff in swap even though there is free RAM. If the data that has been pushed into swap is suddenly needed again then there will be a delay in getting it back. The Linux kernel is very good at making the best use of RAM and it assumes that data in swap that hasn't been accessed in a while probably isn't going to be and that the RAM in the system can be put to better uses such as the disk cache and preventing other things from getting pushed out to swap.
I would have to imagine that when they say "memory" in that sense, that they are referring to the hard drive. Technically the hard drive is also a type of memory. It is a somewhat odd usage of the term nowadays, though.
No, the idea of fragmented memory is under a section "shut down when not in use!" and ends "restarting allows the system memory to start up clean and defragmented." This is something that I had never heard before and I'm afraid I actually said "what in the heck!" out loud until I realized it was only me and the dog :)
Wassercrats
10-04-2005, 12:57 AM
I just read three threads on it. This (http://www.techimo.com/forum/showthread.php?t=54436) is probably the best one.
Kevin
10-04-2005, 01:07 AM
OK, lost memory from leaks is a completely different problem that I wouldn't call fragmentation. The problem is that a program with a memory leak (which is a bug) will allocate RAM but never release it. Leaks are usually small amounts of RAM but sometimes they are big or they are cumulative and become big. Usually restarting the program with the leak will clear out the "leaked" memory but if the leak is in the kernel or a shared library that might not be the case.
The idea behind the memory manager programs that they are talking about in those threads is that if you allocate a huge chunk of RAM then some of the things that were already in RAM will be pushed into swap. The memory that has been leaked isn't really being used anymore so it should be the first to go and it will never be pulled back out of swap (unless you go and shutoff swap). So the end result is that you run a program and your free memory meter goes up a little bit.
Randall
10-04-2005, 11:20 AM
If the data that has been pushed into swap is suddenly needed again then there will be a delay in getting it back. That's been a problem with Mozilla-based browsers on Windows (I've carped about it on a number of occasions), although I think they've finally solved that with recent versions of Firefox. Or maybe it's because I have 1GB of RAM in this PC. :dunno: The idea behind the memory manager programs that they are talking about in those threads is that if you allocate a huge chunk of RAM then some of the things that were already in RAM will be pushed into swap. The memory that has been leaked isn't really being used anymore so it should be the first to go and it will never be pulled back out of swap (unless you go and shutoff swap). So the end result is that you run a program and your free memory meter goes up a little bit. I used Cacheman with Win98 to free up the GDI-type resources, if nothing else. On Windows 2000 it caused more harm than good.
Randall
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.