Utility for clearing RAM to the hard drive. - OS2
This is a discussion on Utility for clearing RAM to the hard drive. - OS2 ; I used to use ALLOCMEM.EXE or that other utility program to clear
programs out of RAM. But, gosh, now I've updated to more than 512MB, so
now I have to use the other, new, improved program that can handle a
...
-
Utility for clearing RAM to the hard drive.
I used to use ALLOCMEM.EXE or that other utility program to clear
programs out of RAM. But, gosh, now I've updated to more than 512MB, so
now I have to use the other, new, improved program that can handle a
larger amount of RAM. But, can I remember the name of the program? Or
where I got it from? (It is now on my trashed hard drive.) I can't find
any such program on Hobbes or using Google (other than the original
ALLOCMEM.EXE.
So, please, what is the name of that other program, and when can I get it?
-
Re: Utility for clearing RAM to the hard drive.
In <46cacd0d@kcnews01>, on 08/21/2007
at 04:31 AM, Nobody said:
Hi,
>where I got it from? (It is now on my trashed hard drive.) I can't find
>any such program on Hobbes or using Google (other than the original
>ALLOCMEM.EXE.
>So, please, what is the name of that other program, and when can I get
>it?
You might be thinking of the Taskmgr from the Graham Utilities.
Steven
--
--------------------------------------------------------------------------------------------
Steven Levine MR2/ICE 3.00 beta 08pre #10183
eCS/Warp/DIY/14.103a_W4 www.scoug.com irc.ca.webbnet.info #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------
-
Re: Utility for clearing RAM to the hard drive.
Steven Levine wrote:
> In <46cacd0d@kcnews01>, on 08/21/2007
> at 04:31 AM, Nobody said:
>
> Hi,
>
>> where I got it from? (It is now on my trashed hard drive.) I can't find
>> any such program on Hobbes or using Google (other than the original
>> ALLOCMEM.EXE.
>
>> So, please, what is the name of that other program, and when can I get
>> it?
>
> You might be thinking of the Taskmgr from the Graham Utilities.
>
> Steven
>
Thanks. No.
SWAPRAM? MEMSWAP? RAMPAGE? PAGERAM?
It is a simple, but important, single utility program. It was made by
the author to replace the older ALLOCMEM, since that program can only
handle 512MB of RAM.
I'll keep searching.
-
Re: Utility for clearing RAM to the hard drive.
In <46d3e122@kcnews01>, on 08/28/2007
at 01:47 AM, Nobody said:
Hi,
>It is a simple, but important, single utility program. It was made by
>the author to replace the older ALLOCMEM, since that program can only
>handle 512MB of RAM.
Actually, based on the source, it probably can't even handle that much. I
suspect it stopped working reliably on systems with 256MB of RAM, just
like the PM version of Partition Magic. It is pretty unusual to ever
have more than 350MB of private address space available for a single
allocation. Allocmem was written for the days of 20MB RAM. On a
reasonably current system with 512 of RAM, it would have no essentially no
effect, even if the logic errors were corrected. It's unlikely anything
would get flushed to the swap file.
The benefit of allocmem on 20MB systems was that you could force some of
the swapping to happen right after booting, rather than over time as the
kernel determines the working set. This might or might not improve system
performance. If allocmem had swapped out files in the working set, the
overall performance might even be worse than without allocmem.
FWIW, allocmem does not swap out files that are not in use, it tends to
swap out file that are not in use recently, where the kernel defines what
recently means.
>I'll keep searching.
Allocmem comes with source. If you want it to work, it needs basically
the same fix that Chris and I came up with for his TaskMgr.
Steven
--
--------------------------------------------------------------------------------------------
Steven Levine MR2/ICE 3.00 beta 08pre #10183
eCS/Warp/DIY/14.103a_W4 www.scoug.com irc.ca.webbnet.info #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------
-
Re: Utility for clearing RAM to the hard drive.
Steven Levine wrote:
> In <46d3e122@kcnews01>, on 08/28/2007
> at 01:47 AM, Nobody said:
>
> Hi,
>
>
> The benefit of allocmem on 20MB systems was that you could force some of
> the swapping to happen right after booting, rather than over time as the
> kernel determines the working set. This might or might not improve system
> performance. If allocmem had swapped out files in the working set, the
> overall performance might even be worse than without allocmem.
>
Good point. Certainly with both of the programs that I've used always
slowed the verify first GUI display that was done after applying using
them. But, the PM interface was returned immediately. I found it most
beneficial with I used to use 64MB of RAM for many years. (OS/2 can work
with that amount of RAM just fine, compared to Win32.) Later I updated
to 128, 256. Then up to 512MB, and now 2.5GB.
> FWIW, allocmem does not swap out files that are not in use, it tends to
> swap out file that are not in use recently, where the kernel defines what
> recently means.
>
Understood. In a multi-tasking OS, and OS itself must always be in charge.
>
> Allocmem comes with source. If you want it to work, it needs basically
> the same fix that Chris and I came up with for his TaskMgr.
>
> Steven
I'll try TaskMgr again.
Thanks.
-
Re: Utility for clearing RAM to the hard drive.
Nobody wrote:
> I used to use ALLOCMEM.EXE or that other utility program to clear
> programs out of RAM. But, gosh, now I've updated to more than 512MB, so
> now I have to use the other, new, improved program that can handle a
> larger amount of RAM. But, can I remember the name of the program? Or
> where I got it from? (It is now on my trashed hard drive.) I can't find
> any such program on Hobbes or using Google (other than the original
> ALLOCMEM.EXE.
>
> So, please, what is the name of that other program, and when can I get it?
I've got a program on my system called PAGEOUT.EXE. My apologies to the
original author, but I don't know who wrote it (but I'm sure it was
freeware). You can grab it from me here:
http://mamodeo.dyndns.org/pageout.exe
It worked on my system with 512MB RAM. Don't know what technique(s) it
uses.
--
[Reverse the parts of the e-mail address to reply.]
-
Re: Utility for clearing RAM to the hard drive.
In , on 09/02/2007
at 02:47 PM, Marty said:
Hi,
>http://mamodeo.dyndns.org/pageout.exe
>It worked on my system with 512MB RAM. Don't know what technique(s) it
>uses.
They all work the same way. The allocate committed private address space
which may force the less recently used DLLs andn EXEs out of memory. The
logic error that many of them have is they attempt to allocate and single
large chunk based on the physical memory size. This, of course, fails
soon after the physical memory exceeds 256MB. A better method is loop on
failure and keep halving the allocation size until some termination
condition is satisfied.
Steven
--
--------------------------------------------------------------------------------------------
Steven Levine MR2/ICE 3.00 beta 08pre #10183
eCS/Warp/DIY/14.103a_W4 www.scoug.com irc.ca.webbnet.info #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------
-
Re: Utility for clearing RAM to the hard drive.
Steven Levine wrote:
> In , on 09/02/2007
> at 02:47 PM, Marty said:
>
> Hi,
>
>> http://mamodeo.dyndns.org/pageout.exe
>
>> It worked on my system with 512MB RAM. Don't know what technique(s) it
>> uses.
>
> They all work the same way. The allocate committed private address space
> which may force the less recently used DLLs andn EXEs out of memory. The
> logic error that many of them have is they attempt to allocate and single
> large chunk based on the physical memory size. This, of course, fails
> soon after the physical memory exceeds 256MB. A better method is loop on
> failure and keep halving the allocation size until some termination
> condition is satisfied.
>
> Steven
>
Oooh, perhaps it is time for another great author to improve upon this
program, just as you have described. Hint, hint. (s)
-
Re: Utility for clearing RAM to the hard drive.
Marty wrote:
> Nobody wrote:
snip
>>
>> So, please, what is the name of that other program, and where can I get
>> it?
>
> I've got a program on my system called PAGEOUT.EXE. My apologies to the
> original author, but I don't know who wrote it (but I'm sure it was
> freeware). You can grab it from me here:
>
> http://mamodeo.dyndns.org/pageout.exe
>
> It worked on my system with 512MB RAM. Don't know what technique(s) it
> uses.
>
Yes, it think this was it. As I recall the author did not give his name.
But, it was certainly a much needed improvement over ALLOCMEM with so
many users now having more than 512MB of RAM.
Although, I have to admit my OS/2 ran just fine with 256MB of RAM. I
order my extra RAM since the local store didn't carry the "old" SO-DIMM
that I required.
Thanks.
-
Re: Utility for clearing RAM to the hard drive.
On Wed, 5 Sep 2007 10:51:23 UTC in comp.os.os2.apps, Nobody
wrote:
> Oooh, perhaps it is time for another great author to improve upon this
> program, just as you have described. Hint, hint. (s)
But the program is almost completly pointless! It just forces something to occur
earlier that would otherwise occur later - i.e. the paging out of unreferenced
memory.
--
Trevor Hemsley, Brighton, UK
Trevor dot Hemsley at ntlworld dot com
-
Re: Utility for clearing RAM to the hard drive.
Trevor Hemsley wrote:
>
> But the program is almost completly pointless! It just forces something to occur
> earlier that would otherwise occur later - i.e. the paging out of unreferenced
> memory.
>
Not really. Especially if it is run as the last thing at startup. os/2
seems to load a number of DLLs at startup that are not used again.
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
-
Re: Utility for clearing RAM to the hard drive.
On Wed, 05 Sep 2007 12:00:16 -0700, Jim Moe
wrote:
>> But the program is almost completly pointless! It just forces something to occur
>> earlier that would otherwise occur later - i.e. the paging out of unreferenced
>> memory.
>
> Not really. Especially if it is run as the last thing at startup.
All it would seem to do to me is force a load of possibly pointless swapping.
How does this thing know how much memory to allocate? You have to allocate
more memory than you have to force some swapping, but how do you know where
to draw the line? Allocate too much and you end up swapping back in what you
just swapped out 'cos it's needed.
Seems like another pointless thing to slowdown startup to me.
> os/2 seems to load a number of DLLs at startup that are not used again.
Which DLLs would they be then? And how did you tell?
-
Re: Utility for clearing RAM to the hard drive.
On Wed, 5 Sep 2007 19:32:05 UTC in comp.os.os2.apps, Paul Ratcliffe
wrote:
> On Wed, 05 Sep 2007 12:00:16 -0700, Jim Moe
> wrote:
>
> >> But the program is almost completly pointless! It just forces something to occur
> >> earlier that would otherwise occur later - i.e. the paging out of unreferenced
> >> memory.
> >
> > Not really. Especially if it is run as the last thing at startup.
>
> All it would seem to do to me is force a load of possibly pointless swapping.
> How does this thing know how much memory to allocate? You have to allocate
> more memory than you have to force some swapping, but how do you know where
> to draw the line? Allocate too much and you end up swapping back in what you
> just swapped out 'cos it's needed.
I think it allocates *everything* and forces everything except the active parts
of itself to be paged out on the basis that after it ends, then only recently
referenced things will be in RAM.
> Seems like another pointless thing to slowdown startup to me.
My point exactly. What's in RAM is better there than on disk and if RAM becomes
a bottleneck then you're better off letting the o/s decide what to swap because
it can tell what's been least recently used and page that. This utility seems to
want to do it the other way around - force everything out and then let the o/s
bring back in what it really needs.
--
Trevor Hemsley, Brighton, UK
Trevor dot Hemsley at ntlworld dot com
-
Re: Utility for clearing RAM to the hard drive.
In <46de8a19$1@kcnews01>, on 09/05/2007
at 03:51 AM, Nobody said:
>Oooh, perhaps it is time for another great author to improve upon this
>program, just as you have described. Hint, hint. (s)
If I thought it would be useful, I probably would have already done it.
It's probably less than a dozen lines of code. Since OpenWatcom is freely
available and is easy to install, it would be an excellent training
exercise for someone new to programming.
Steven
--
--------------------------------------------------------------------------------------------
Steven Levine MR2/ICE 3.00 beta 08pre #10183
eCS/Warp/DIY/14.103a_W4 www.scoug.com irc.ca.webbnet.info #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------
-
Re: Utility for clearing RAM to the hard drive.
In , on 09/05/2007
at 12:00 PM, Jim Moe said:
Hi,
> Not really. Especially if it is run as the last thing at startup. os/2
>seems to load a number of DLLs at startup that are not used again.
And what does something Allocmem do to change this? Consider how eCS/OS2
works. If an executable's reference count goes to zero, the memory
resources it uses are freed and the physical memory blocks are put on the
free list. If some other excutable needs a block of physical memory, it's
right there ready to use. No muss; no fuss; no swapping. Even better,
the pager is smart enough to be able to reclaim the physical block from
the free list if the original excutable is reloaded before the block used
for other purposes. Of course, this is only going to happen for blocks
that are not relocated or otherwise modified.
In addition, a bit of math tells us Allocmem is not going to do more than
use some CPU cycles on a system with 512MB or more RAM. Let's say it
could allocate 350MB of private address space, which is a typical limit,
what would happen? The net effect would be to take 350MB worth of
physical memory off the free list for a short period of time.
Steven
--
--------------------------------------------------------------------------------------------
Steven Levine MR2/ICE 3.00 beta 08pre #10183
eCS/Warp/DIY/14.103a_W4 www.scoug.com irc.ca.webbnet.info #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------
-
Re: Utility for clearing RAM to the hard drive.
In , on 09/05/2007
at 03:21 PM, "Trevor Hemsley"
said:
Hi,
>My point exactly. What's in RAM is better there than on disk and if RAM
>becomes a bottleneck then you're better off letting the o/s decide what
>to swap because it can tell what's been least recently used and page
>that. This utility seems to want to do it the other way around - force
>everything out and then let the o/s bring back in what it really needs.
This actually had some benefit on ancient memory constrained systems.
Swapping was sure to occur as the user loaded the production apps. The
idea was to move some of the swapping to boot time when the user did not
expect the system to be responsive. The system was not really performing
any better overall, but the user perception was that it was.
In some ways, this is not so different that the fast load provided by
OOorg. This clearly slows down bootup, but makes it appear that OOorg
starts faster.
Steven
--
--------------------------------------------------------------------------------------------
Steven Levine MR2/ICE 3.00 beta 08pre #10183
eCS/Warp/DIY/14.103a_W4 www.scoug.com irc.ca.webbnet.info #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------
-
Re: Utility for clearing RAM to the hard drive.
Paul Ratcliffe wrote:
>
>>> But the program is almost completly pointless! It just forces something to occur
>>> earlier that would otherwise occur later - i.e. the paging out of unreferenced
>>> memory.
>>
>> Not really. Especially if it is run as the last thing at startup.
>
> All it would seem to do to me is force a load of possibly pointless swapping.
> How does this thing know how much memory to allocate? You have to allocate
> more memory than you have to force some swapping, but how do you know where
> to draw the line? [...]
>
Here's the whole program:
/* **
build with: g++ -Wall -Zexe -Zomf allocmem.c allocmem.def
** */
#define MODERN
#define INCL_BASE
#define INCL_DOS
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define PAGESIZE 4096L
int i;
ULONG n;
void (* sig_segv_old)(int);
void sig_segv_handler (int signum)
{
fprintf(stderr, "?Segment violation, out of range memory access, bad
stuff like that.\n");
fprintf(stderr, " Occurred when the memory value became %ld on the
%dth page\n", n, i);
exit (signum);
}
int main (int argc, char **argv)
{
void * baseptr;
char * ptr;
char * bptr;
ULONG n1;
ULONG physmem_resmem[2];
APIRET rc;
sig_segv_old = signal(SIGSEGV, &sig_segv_handler);
rc = DosQuerySysInfo(QSV_TOTPHYSMEM, QSV_TOTRESMEM, &physmem_resmem,
sizeof(physmem_resmem));
switch (rc)
{
default:
case 0: break;
case 87: fprintf(stderr, "Invalid Parameter\n"); break;
case 111: fprintf(stderr, "Buffer Overflow\n"); break;
}
if (0 != rc)
exit(0);
if (argc != 2)
n = physmem_resmem[0] - physmem_resmem[1];
else
{
/* round up to 4K page */
n = (1024L * atoi(argv[1]) + 4095L) & 0xFFFFF000;
if (0 == n)
{
printf("?[%d] is an invalid value\n", atoi(argv[1]));
puts("Usage: allocmem [# of K]\n" );
exit(1);
}
}
printf("Physical Memory %ld K, Resident Memory %ld K\n",
physmem_resmem[0] / 1024L, physmem_resmem[1] / 1024L);
rc = DosAllocMem(&baseptr, (n), PAG_COMMIT | PAG_WRITE);
/* Hunt for an amount to allocate that is legal. */
if (8 == rc)
{
// If not enough memory, decrease allocation until there is. Binary search.
n1 = n;
do {
n1 = n1 / 2;
if (8 == rc)
{
n -= n1;
rc = DosAllocMem(&baseptr, (n), PAG_READ);
}
else // 0 == rc
{
n += n1;
rc = DosFreeMem(baseptr);
rc = DosAllocMem(&baseptr, (n), PAG_READ);
}
} while (PAGESIZE < n1);
if (0 == rc)
rc = DosFreeMem(baseptr);
else
n -= n1;
rc = DosAllocMem(&baseptr, (n), PAG_COMMIT | PAG_WRITE);
}
printf("Allocating %ld K... ", n / 1024L);
switch (rc)
{
default:
case 0: break;
case 8: fprintf(stderr, "Not Enough Memory\n"); break;
case 87: fprintf(stderr, "Invalid Parameter\n"); break;
case 95: fprintf(stderr, "Interrupted system call\n"); break;
}
if (0 != rc)
exit(0);
bptr = (char *) baseptr;
ptr = bptr + (n - PAGESIZE);
i = 0;
do
{
++i;
*ptr = 0; /* Force it to allocate */
ptr -= PAGESIZE; /* Move to the next page. */
DosSleep(0);
}
while (bptr <= ptr);
printf("\n");
exit (0);
}
The DEF file:
NAME ALLOCMEM WINDOWCOMPAT
PROTMODE
DATA MOVEABLE
CODE MOVEABLE PURE
STACKSIZE 1524288
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
-
Re: Utility for clearing RAM to the hard drive.
Trevor Hemsley wrote:
> On Wed, 5 Sep 2007 19:32:05 UTC in comp.os.os2.apps, Paul Ratcliffe
> wrote:
>
Snip
>
> I think it allocates *everything* and forces everything except the active parts
> of itself to be paged out on the basis that after it ends, then only recently
> referenced things will be in RAM.
>
>> Seems like another pointless thing to slowdown startup to me.
>
> My point exactly. What's in RAM is better there than on disk and if RAM becomes
> a bottleneck then you're better off letting the o/s decide what to swap because
> it can tell what's been least recently used and page that. This utility seems to
> want to do it the other way around - force everything out and then let the o/s
> bring back in what it really needs.
>
Trevor you wrote such a utility. I still use (and enjoy) your MEMOS2.EXE
program. Although, from your text file it is clear to see that you meant
it to be used to allow one to understand how much RAM OS/2 "believes"
it has available. And your program makes a report back to the user with
this information.
These days I do get a error from it:
4OS2.EXE
A program generated an access violation at 00010460.
MEMOS2.EXE 0001:00000460
And your program reports:
.... .
Exception = c0000005 occurred at EIP = 10460.
I don't that this is an error in your program. But, I certainly would
appreciate it updated for my large hard drives, paging files, and large
amount of RAM.
-
Re: Utility for clearing RAM to the hard drive.
Steven Levine wrote:
> In <46de8a19$1@kcnews01>, on 09/05/2007
> at 03:51 AM, Nobody said:
>
>> Oooh, perhaps it is time for another great author to improve upon this
>> program, just as you have described. Hint, hint. (s)
>
> If I thought it would be useful, I probably would have already done it.
> It's probably less than a dozen lines of code. Since OpenWatcom is freely
> available and is easy to install, it would be an excellent training
> exercise for someone new to programming.
>
> Steven
>
FWI, once I was able to get the proper name of the utility that I was
thinking of (which is, PAGEOUT.EXE), I found that in this group some
time back, one write wrote that the author is Andrew Belov. But, now
text file with such information is provided with the program. The
program file comes along all by itself.
Thanks everybody.
-
Re: Utility for clearing RAM to the hard drive.
On Thu, 6 Sep 2007 20:09:25 UTC in comp.os.os2.apps, Nobody
wrote:
> Trevor Hemsley wrote:
> > On Wed, 5 Sep 2007 19:32:05 UTC in comp.os.os2.apps, Paul Ratcliffe
> > wrote:
> >
> Snip
> >
> > I think it allocates *everything* and forces everything except the active parts
> > of itself to be paged out on the basis that after it ends, then only recently
> > referenced things will be in RAM.
> >
> >> Seems like another pointless thing to slowdown startup to me.
> >
> > My point exactly. What's in RAM is better there than on disk and if RAM becomes
> > a bottleneck then you're better off letting the o/s decide what to swap because
> > it can tell what's been least recently used and page that. This utility seems to
> > want to do it the other way around - force everything out and then let the o/s
> > bring back in what it really needs.
> >
> Trevor you wrote such a utility.
It's true that I wrote something but it was never intended for this purpose. It
never pretended that it was a good thing to force everything out into the
swapfile, just that it would do so. Reading the description I wrote shows that,
but I have to admit that I don't remember what I thought it was doing at the
time I wrote that readme!
> These days I do get a error from it:
> 4OS2.EXE
>
> A program generated an access violation at 00010460.
> MEMOS2.EXE 0001:00000460
That's because it was written in the days (11 years ago!) when 128MB RAM was a
gigantic amount and far more than most users were using. It never even occurred
to me that we'd see machines with such prodigious amounts of RAM installed that
it would exceed OS/2's (old) 512MB limit per process. It's crashing because the
amount of physical memory is now greater than the amount available in the
private arena < 512MB. It could be fixed but frankly I don't think it's worth it
- the program was really written to stress test my system and there are better
alternatives available today that don't need an o/s at all (memtest86 and
memtest86+).
--
Trevor Hemsley, Brighton, UK
Trevor dot Hemsley at ntlworld dot com