Re: [racket-users] Memory usage on Linux

2018-08-26 Thread Jonathan Simpson
Yes, it is running on a linode and the OOM eventually kills the process. There is some swap space available, but I probably should increase it. I started with trying to understand my racket program because it is a lot more fun for me than sysadmin type stuff :) -- Jonathan On Sunday, August

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread George Neuner
On 8/26/2018 6:43 PM, Jonathan Simpson wrote: The fact that Racket isn't releasing the memory back to the OS appears to be causing the system to eventually run out of physical pages. Is this a cloud server?  Is the problem that the "out-of-memory" (OOM) handler is killing processes?  That

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread Jonathan Simpson
On Sunday, August 26, 2018 at 7:43:20 PM UTC-4, Matthew Flatt wrote: > > > Racket's memory manager does not immediately release pages back to the > OS (i.e., unmap them) after a GC. In its current configuration, the GC > releases a page at the beginning of a major GC only if the page was >

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread George Neuner
On 8/26/2018 7:43 PM, Matthew Flatt wrote Racket's memory manager does not immediately release pages back to the OS (i.e., unmap them) after a GC. In its current configuration, the GC releases a page at the beginning of a major GC only if the page was unused at the *start* of the previous GC.

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread Matthew Flatt
At Sun, 26 Aug 2018 09:55:25 -0700 (PDT), Jonathan Simpson wrote: > Then if I run (collect-garbage 'major), > current-memory-use reports only about 300MB in use, but the VIRT/RES values > reported by top do not change. The VIRT/RES values don't actually decrease > until I unlink the variable

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread Jonathan Simpson
Thanks for the response as it confirms my suspicions. For my purposes the resident memory reported by top should be accurate enough. I'm talking about 100s of MB that I'd like to free immediately, so I'm not too concerned about CODE pages or the GC taking a few MBs. All that is dwarfed by the

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread George Neuner
On 8/26/2018 12:55 PM, Jonathan Simpson wrote: I have a Racket application that I need to run in a fairly memory constrained environment(1 GB ram) and I've ran into something I don't quite understand. The application is deserializing a fairly large data structure from disk on startup. After