FreeBSD RAM usage problem

Hi ,
I have a VPS with FreeBSD , which has 6GB of RAM. The problem is that the ram increases every time.
For example: I unpatch/patch some .tar.gz files , I check the RAM , and is at 4 GB used ... and so on increases , and not even decreases back , which I found abnormally . My server shuts down after one day because the ram gets at maximum and I need to restart every day the VPS which is annoying. So even I don't do anything and just let the server run by itself the ram increases and doesn't go back . I've checked the processes and my Server+MySQL eats just 3 GB of RAM after one day .
Unused memory is useless memory. FreeBSD will always use as much as possible, even if it's only for filesystem caches. Filesystem (and process) caches however will be released if there's an application that requires the memory. To an untrained eye the system however will look like it has no free memory.

As for MySQL, it needs to be tuned. A lot of MySQL installations I've come across have been tuned badly. They'll consume more memory than the system actually has, which is obviously very bad for performance.
It's quite difficult to actually know if there is a real memory leak somewhere of if it's just a case of memory being allocated, deallocated and put on the Inactive list. You have to delve quite deep into the vmstat(8) statistics and also turn on the kernel debugging features to assist you in the bug hunting. This is usually outside the scope of a regular user.