Swap will get filled up when the system runs out of RAM. You can think of it as an overflow carpark that's slightly further away from Tesco than the regular carpark =) Also, sometimes, people use the overflow carpark anyway. Swap is a useful way of moving memory resident things out of the fast memory and into the slower one - it may be something in your kernel (kernel = car park attendant, perhaps?) that is allowing swap usage before your actual memory is filled up. Beyond that, I'm just guessing.
So, let's examine some of this:
Quote:
Got a Hitachi HD checking utility and it says its fine
|
My understanding of checking utilities is that they simply check the disk sectors. If the HD has a more mechanical problem that is affecting the spin mechanism, then it's entirely possible that the utility wouldn't pick up on that kind of fault.
Quote:
Could my swap issue be from a bad HD ?
|
If you mean that in relation to "why are programs leaking into swap and then not going away when i close them?" then I seriously doubt it.
Quote:
And could this abormal HD behavior be caused from my swapoff /dev/hda2 ?
|
Again it seems unlikely that swapoff will cause such extreme hardware failure.
A few tests and a few queries:
* Boot into run level 3 and let it sit there for an hour without logging in - see what happens. If nothing much happens when you log in and check top, you can conclude your core OS is probably ok, and it's related to something other than the basic system.
* Do the same with run level 4. Just boot into it and leave it for an hour. Check mem usage after an hour. If nothing else happens, then X itself is not causing your issue.
* Now go back to run level 3 (always clean boot from power off, never reboot) and log in. Leave it for an hour, make sure it's nothing that's being run by users.
* Same with run level 4, log in and leave it for an hour.
Now you've eliminated the potential system problems - time to check the programs you're running, and how you're running them.
* amule uses java? I'm not familiar with amule, I'm afraid, but Java is notorious for not cleaning up after itself very well. Try using the PC *without* java for an hour and see what happens.
* I note that everything is running as root - try running things as a user instead (I can't imagine what kind of difference it will make, but it's one more test scenario that can be checked) - so into run level 3, login as a user, startx ... etc etc.
Good luck on getting everything back - let me know how it goes =)
- Piete.