Oolite eating disk space by the GB?

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post by Switeck »

Cmdr James wrote:
If windows runs out of physical memory, it starts allocating memory that doesnt really exist, and swaps sections of content from physical ram to space on disk (a swap file). The virtual memory of the superset of physical and swap space.
Only when specifically set to conservative swapfile usage will any windows version from Win 95 onward swap from ram to disk only when it runs out of free (or at least unallocated) ram.

Basically most windows versions will instead swap to disk any "inactive" app that is using lots of ram...even if ram usage isn't >50%! This is why using a fast drive for the swapfile is critical as is making sure the swapfile is on the fastest part of the disk and not fragmented. This means probably fixed swapfile size, and the risks of overruns that can incur.
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Post by Cmd. Cheyd »

Switeck - You may want to read up on the differences made in how Vista and Win7 deal with virtual memory / swap space. There were significant changes to behavior.
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post by maik »

OK, I just looked a bit closer to get some data. First, I closed all applications. My main HDD has about 5GB free space, my main memory is 3GB.

What I found out about OS X swap file behaviour is a) you cannot set a max size, this is controlled by the OS and b) you can set the max swap "page" size for lack of a better term, which seems to be set to ~500MB.

I started playing Oolite and took data samples every time I jumped into a new system or got killed (was on a random hits mission ;-)) and thus thrown back to the start screen. This happened twice but didn't have an impact on memory usage. The data I sampled was the time and the amount of swap space used, determined via ls -l /private/var/vm. This gives me multiples of 2KB so for the below graph I divided accordingly:

Image

After I had only 800MiB of free disk space left I quit Oolite (this is at the spike in the graph). Afterwards I waited a bit, opening finder, Grab etc. This decreased the swap space usage back to where it was.

This dialogue shows Oolite's memory usage just before I quit it:

Image

The jumps in swap space typically occur when I enter a new system. I can tell because the HDD works for a few seconds and the hyperspace wormhole animation goes out of sync with the sound. The longer I play the more frequently swap space is increased.

Any ideas what could be causing this?
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Textures/ships. The less OXPs you have installed, the less there is for Oolite's system generator to juggle in memory...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post by maik »

We are talking about 4GiB and more here. That's a lot if you take Eric's explanation about releasing textures once not needed anymore into account. It also doesn't explain why the rate of increasing swap space accelerates, look at the curve :shock:.
User avatar
Darkbee
---- E L I T E ----
---- E L I T E ----
Posts: 335
Joined: Mon Aug 09, 2004 8:40 pm
Location: Space... man!
Contact:

Post by Darkbee »

Oolite has a memory leak, and nobody else has noticed? Possible.
Darkbee
Oolite: A grOovy Kind of Love
Image
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post by maik »

It is well possible that the swap space usage flattens out eventually. I only noticed because I'm low on disk space at the moment :?.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Darkbee wrote:
Oolite has a memory leak, and nobody else has noticed? Possible.
Oolite has/had lots of memory leaks. Many of them were plugged over time (and new versions), but there could of course one or two be left (or new ones opened).
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post by Switeck »

Or it could be a memory leak caused by a OXP or group of OXPs.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

I could be wrong but I think it (should be) pretty much impossible for an OXP to leak memory unless either spidermonkey or oolite has a leak that is exposed by the OXP.

So if there is a leak in an OXP, I think its an oolite problem not an OXP problem.
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post by maik »

Tomorrow or the day after tomorrow a bunch of new HDDs should arrive. Once I put them into my machine I will test to see if the swap space usage eventually flattens out.
Post Reply