Detecting Low Memory With Client

Cannon Smith (4/15/14 1:46PM)
Joshua Fletcher (4/15/14 10:44PM)
Cannon Smith (4/16/14 1:18PM)


Cannon Smith (4/15/14 1:46 PM)

Hi Everyone,

Lately weíve had a couple occasions where a client computer ran low on
memory and ended up corrupting some data. Iím pretty sure the users
saw the OS memory warning and just dismissed it. There is only one
situation where I need to worry about Client taking up a lot of memory
so Iím wondering if there is a good way of programmatically checking
for a low memory situation and then handling things in code before
corruption can occur.

Does anyone do this? Which commands do you use? I assume GET MEMORY
STATISTICS? What is a safe threshold to watch for?

Thanks.

--
Cannon Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236
<cannon@...
<www.synergyfarmsolutions.com>

Joshua Fletcher (4/15/14 10:44 PM)

Without more details (4D version, OS version, OS architecture, total
RAM, etc.) your question can't be answered technically but I think
this Tech Tip covers a lot of it:

http://kb.4d.com/assetid=76398

The threshold completely depends on your application. ?It sounds like
you've already identified the memory-consuming portion of your app so
the next step is to determine the parameters around that consumption.
?My suggestion would be to start logging memory usage (via GET MEMORY
STATISTICS) to get an idea of how memory grows. ?Important: log this
by task, not over time (or in addition to over time). ?Work to
identify the maximum delta for a given task and set that as your
threshold. ?That way you know the user can complete any single task
before you kick them out.

Kind regards,

Josh

--
Josh Fletcher
Technical Account Manager
4D, Inc

color><param>00000,0000,DDEE/param>
/color>

-----Original Message-----
color><param>00000,0000,DDEE/param>FFrom: 4d_tech-bounces@...
[mailto:4d_tech-bounces@...
On Behalf Of Cannon Smith
Sent: Tuesday, April 15, 2014 12:47 PM

Hi Everyone,

Lately we?=80&ocirc;ve had a couple occasions where a client computer ran
low
on
memory and ended up corrupting some data. I?=80&ocirc;m pretty sure the
users
saw
the OS memory warning and just dismissed it. There is only one
situation
where I need to worry about Client taking up a lot of memory so I?=80&ocirc;
m
wondering if there is a good way of programmatically checking for a low
memory situation and then handling things in code before corruption can
occur.

Does anyone do this? Which commands do you use? I assume GET MEMORY
STATISTICS? What is a safe threshold to watch for?

Thanks.
/color>

Cannon Smith (4/16/14 1:18 PM)

Hi Tim,

Thanks for the info.

--
Cannon Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236
<cannon@...
<www.synergyfarmsolutions.com>

On Apr 16, 2014, at 12:44 PM, Timothy Penner <tpenner@... wrote:

color><param>00000,0000,DDEE/param>MMy understanding was that Used
Virtual Memory represents both Virtual and Physical memory, so there
is no need to have a 'combined' value as the Virtual is already
combined. I think you could calculate a delta though, where you take
the UsedVirtualMemory and subtract the UsedPhysical to find the amount
of memory paged to disk?
/color>

Reply to this message

Summary created 4/17/14 at 1:23AM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com