Author Topic: How to have quantity and quality of memory  (Read 17048 times)

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
How to have quantity and quality of memory
« on: July 17, 2020, 05:22:40 pm »

Keep these two values in the config.sys fixed without changing them:

SET JAVA_HIGH_MEMORY=1       rem in the end of the config.sys
VIRTUALADDRESSLIMIT=2048     rem remplace value


Then modify this line until it is adjusted to optimal performance:

SWAPPATH=C:\OS2\SYSTEM 2048 1228800  rem this is my value 1228800

Start with 409600 adding blocks of 409600, i.e. 819200 , 1228800

If at any time the system stops booting, then ALT + F1 then F2 tedit config.sys esc and correct the number , save and restart.


In my case I have gone from some values at startup
With the old config.sys
[C:\]mem /v

Total physical memory:      8 142 MB
Accessible to system:       3 054 MB
Additional (PAE) memory:    5 088 MB

Resident memory:              124 MB
Available virtual memory:   2 880 MB

Available process memory:
  Private low memory:         376 MB
  Private high memory:      1 344 MB
  Shared low memory:          322 MB
  Shared high memory:       1 323 MB



to these


[C:\]mem /v

Total physical memory:      8 142 MB
Accessible to system:       3 054 MB
Additional (PAE) memory:    5 088 MB

Resident memory:              124 MB
Available virtual memory:   4 078 MB      ******!!!!*****

Available process memory:
  Private low memory:         387 MB
  Private high memory:      1 344 MB
  Shared low memory:          333 MB
  Shared high memory:       1 323 MB

After open a lot of programs:

[C:\]mem /v

Total physical memory:      8 142 MB
Accessible to system:       3 054 MB
Additional (PAE) memory:    5 088 MB

Resident memory:              148 MB
Available virtual memory:   2 817 MB

Available process memory:
  Private low memory:         100 MB
  Private high memory:      1 344 MB
  Shared low memory:            0 MB       see this ZERO!! NO PROBLEM NO CRASH
  Shared high memory:         461 MB


With the difference that everything flows better and works better.

I hope it works for you.
This ARCAOS is the best system in the world.
I am happy.

For Andy:
The web-site you were commenting on ate the memory, I put it with another one from yahoo that also did the same,
 and the one you were commenting on ended with a 404 hahahaha, Our memory is no longer eaten.
 Thanks Andy.

Matt Walsh

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: How to have quantity and quality of memory
« Reply #1 on: July 17, 2020, 06:07:36 pm »
Any idea how this interacts with a large RAM disk, and since you can't use the RAM disk in your swap path, would a smaller RAM disk work better with larger swap file?
Matt W.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: How to have quantity and quality of memory
« Reply #2 on: July 17, 2020, 08:37:20 pm »
Quote
SET JAVA_HIGH_MEMORY=1       rem in the end of the config.sys

From what I can find, this is only for JAVA 1.x (1.8 specifically). Position in CONFIG.SYS should make no difference.

Quote
SWAPPATH=C:\OS2\SYSTEM 2048 1228800  rem this is my value 1228800

All that does, for me, is make a 1200 MB swap file. You will probably find that swapping is never (or very rarely) used when you have more than 2 GB of real memory, anyway. Even on my old IBM ThinkPad T43, with 1.5 GB of real memory, I never see it actually use the swap space, although it can be forced, if I try hard enough.

Which version of OS/2 are you using? Which version of mem.exe (use bldlevel)?

I think that what you are seeing is a number wrap. I am using ArcaOS 5.0.5, and I can't reproduce what you show, but I didn't spend much time with it.

Quote
Any idea how this interacts with a large RAM disk, and since you can't use the RAM disk in your swap path, would a smaller RAM disk work better with larger swap file?

It may depend on which RAMDISK you use. I have the Arca Noae RAMDISK, as drive R:, using all memory above what OS/2 can normally use (about 4992 MB in this case), and HPFS format. I can set the SWAPPER to use the RAMDISK (SWAPPATH=R:\ 2048 2048), and it would probably work, if I limit my available memory to something small enough to force it to swap. The trick is, that the RAMDISK must be either HPFS, or JFS. There is support in the drivers for swapping. The path also needs to exist, when the swapper file is created (it is created new, at each boot), which means you must use the root of the RAMDISK, because there seems to be no way to create paths on the RAMDISK, before the swapper file is created. If you use a RAMDISK that uses normal memory, you would be better off to use that memory as real memory, so swapping is not required, and you won't run out of room.

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: How to have quantity and quality of memory
« Reply #3 on: July 17, 2020, 11:16:04 pm »
Matt Walsh
I understand that a Ramdisk is something else.
 I have a 4100mb ramdisk as drive g:
 When trying to fill it with data everything has been blocked. Reboot the system.
I have formatted it as jfs and I have put 256mb of reserved low memory and without problems.
I have filled the 4.1gb ramdisk with 4gb of files without any problem.
I'm also not sure I understand your question.

Doug Bissett
Not only is it a swap issue, with small amounts of memory, no improvements are seen,
 but it still works like the engine of a Ferrari.
  You don't need to see it to know that it sounds perfect.
  This system is a ver504 upgraded to 505 from Arcaos.
[D:\BBB]bldlevel c:\sys\bin\mem.exe
Build Level Display Facility Version 6.12.675 Sep 25 2001
(C) Copyright IBM Corporation 1993-2001
Signature:       @#Alexander Taylor:1.1#@##1## 6 Jan 2019  15:04:11     reinforc
e::::::@@MEM.EXE - report physical memory
Vendor:          Alexander Taylor
Revision:        1.01
Date/Time:       6 Jan 2019  15:04:11
Build Machine:   reinforce
File Version:    1.1
Description:     MEM.EXE - report physical memory

ivan

  • Hero Member
  • *****
  • Posts: 1561
  • Karma: +17/-0
    • View Profile
Re: How to have quantity and quality of memory
« Reply #4 on: July 18, 2020, 11:04:09 am »
Hi roberto,

What exactly are you trying to do?

With SWAPPATH all you are doing is starting with a very large swap file.  The following information is taken from the config sys database.

---------------------------------------------------------------------------------------
SWAPPATH

=drive,path,mmm(in kb),nnn (in kb)
 
 
Parameter:
 
mmm is a number from 512 to 32767 which specifies how large the SWAPPER.DAT file can grow before it stops consuming hard disk space. The size is stated in the negative. In other words, if you have the mmm set to 512, then the SWAPPER.DAT file can grow until there is only 512k left on your hard disk.
 
nnn is the starting size of the SWAPPER.DAT file.

------------------------------------------------------------------------------------------

Maybe you should be looking at the MEMMAN option in your config sys.  Again from the database.

------------------------------------------------------------------------------------------
MEMMAN

=value
 
OS/2 can run more programs and use more data than can actually be stored in memory at any given time. This is done by swapping large amounts of memory to your hard disk and then reading the data back into memory when needed. This is called virtual memory. For example, if you have 4MB of memory you will see lots of disk activity while you are working with your system. A lot of this is OS/2 swapping memory to and from your hard disk. Lots of memory swapping slows down your system and can cause your hard disk to fragment quicker than normal.
 
Values:
 
The MEMMAN command controls the swap process. The syntax is MEMMAN=s,m,PROTECT,COMMIT where s=SWAP or NOSWAP; m=MOVE or NOMOVE.
The default is to have virtual memory on. To turn off virtual memory, which is NOT recommended, the config.sys file line should read: MEMMAN=NOSWAP. See <<=CAUTION=>> below.
 
PROTECT allows the allocation and use of protected memory for certain DLLs. This is done to protect those DLLs from being trashed by an errant program. Unless you are a programmer who needs this set to NOPROTECT, leave the default.
 
COMMIT. OS/2 will allocate space in the swap file whenever a program commits memory, i.e., a page in the swap file is allocated for every page of memory committed by a program, even if the data never actually gets swapped out. Your system should be more stable, but it will be slower also, since your swap file will grown when it doesn't have to. If you use this parameter, increase the size of your SWAPPER.DAT file by the amount of memory you are likely to use when using the COMMIT parameter. Most people "in-the-know" suggest that COMMIT not be used unless it is required by 16-bit OS/2 application

--------------------------------------------------------------------------------

As a side note, be VERY careful if you try using NOSWAP it may make your system unbootable.





roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: How to have quantity and quality of memory
« Reply #5 on: July 18, 2020, 01:21:44 pm »
Hi roberto,
Parameter:
 
mmm is a number from 512 to 32767 which specifies how large the SWAPPER.DAT file can grow before it stops consuming hard disk space. The size is stated in the negative. In other words, if you have the mmm set to 512, then the SWAPPER.DAT file can grow until there is only 512k left on your hard disk.
 
nnn is the starting size of the SWAPPER.DAT file.
Can you explain this:
[C:\os2\system]dir swapper.dat

The volume label in drive C is ARCAOS.
The Volume Serial Number is C78D:15C3.
Directory of C:\os2\system

18/07/20  9:16    1.258.291 K      0 ----  SWAPPER.DAT
        1 file(s) 1.258.291 K bytes used
                   12.948.082 K bytes free

Maybe the manual is old?

PD. By removing ramdisk, it improves performance. The hard disk I am using is an sdd.

ivan

  • Hero Member
  • *****
  • Posts: 1561
  • Karma: +17/-0
    • View Profile
Re: How to have quantity and quality of memory
« Reply #6 on: July 18, 2020, 04:53:43 pm »
Nothing strange about that.  Your swap file is 1,258,291K in size and was last written to at 9:16 on 18/07/20 which is about normal and there are 0 EAs attached.  It also says the reserved space for the file is 12,984,082K.

Pete

  • Hero Member
  • *****
  • Posts: 1294
  • Karma: +9/-0
    • View Profile
Re: How to have quantity and quality of memory
« Reply #7 on: July 18, 2020, 06:43:25 pm »
Hi All

Surely the "12.948.082 K bytes free" is the remaining free disk space not reserved space for swapper.dat


Regards

Pete

ivan

  • Hero Member
  • *****
  • Posts: 1561
  • Karma: +17/-0
    • View Profile
Re: How to have quantity and quality of memory
« Reply #8 on: July 18, 2020, 09:54:08 pm »
Opps!!  I thought I copied the correct figure from the calculator but it appears I didn't.  The reserved space for the file is 12,946,034K  (12,948,082 - 2048.  That is the amount of free space on the disk partition minus the amount that is left free).

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: How to have quantity and quality of memory
« Reply #9 on: July 18, 2020, 11:46:04 pm »
I just got this error out in FM / 2 ver 3.24, attached photo. Is this from netlabs? or I don't know who to send the file to.
Pete and Ivan,
but have you tried it, my setup suggestion?
Pete is a **dir** comand, error? in copy paste?




David Graser

  • Hero Member
  • *****
  • Posts: 878
  • Karma: +87/-0
    • View Profile
Re: How to have quantity and quality of memory
« Reply #10 on: July 19, 2020, 12:35:06 am »
I just got this error out in FM / 2 ver 3.24, attached photo. Is this from netlabs? or I don't know who to send the file to.
Pete and Ivan,
but have you tried it, my setup suggestion?
Pete is a **dir** comand, error? in copy paste?

Post here. 

http://trac.netlabs.org/fm2/wiki

ivan

  • Hero Member
  • *****
  • Posts: 1561
  • Karma: +17/-0
    • View Profile
Re: How to have quantity and quality of memory
« Reply #11 on: July 19, 2020, 02:27:41 am »
Hi roberto,

You still haven't said what you are trying to achieve with these settings.  It would also help if you described the computer you are using them on (mboard, CPU, memory etc.).

My swapper.dat file hovers around 2 Mb regardless of what I do.

Since all my java programs are started from program objects I don't have java mentioned in my config.sys.

Andi B.

  • Hero Member
  • *****
  • Posts: 817
  • Karma: +11/-2
    • View Profile
Re: How to have quantity and quality of memory
« Reply #12 on: July 19, 2020, 11:29:42 am »
May I remind people about the simple utility above512watch.cmd or memmon.cmd or whatever it is called for -
Code: [Select]
{0}[p:\util\above512] type above512watch.cmd
/* memmon.cmd - memory monitor */
/* a wrapper for above512 to monitor memory usage */
/* use control+c to stop monitoring */
/* pm = private memory */
/* sm = shared memory */
/* left entries display memory below 512 */
/* right entries display memory above 512 */

out = 0
curline = ""
first_string = ""

call rxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
call SysLoadFuncs


SIGNAL ON HALT /* termine program with CONTROL+C */

"mode 60,75"

do forever

'@ABOVE512 2>nul | rxqueue 2>NUL 1>&2'
call SysSleep 1

do while queued() <> 0
curLine = lineIN( "QUEUE:" )

if out = 0 then do
parse var curLine first_string .
if first_string = "current" then out = 1
else out = 0
end
else do
parse var curline val.1 . val.2 . . . val.3 . val.4 .
say "pm:" val.1 "sm:" val.2 " <---512---> pm:" val.3 "sm:" val.4

out = 0
end

end
end

exit

HALT:
exit

I think it came with the above512 package but not sure anymore. With this little script it's easy to monitor memory usage without knowing the details of Theseus. I have it running all the time. So I get a feeling about memory consumption of different applications. And I see when memory runs out before it makes my system unstable.

Sample output here while some apps are running -
Code: [Select]
pm: 253056 sm: 156544  <---512---> pm: 1835008 sm: 1542520
pm: 253056 sm: 156544  <---512---> pm: 1835008 sm: 1542520
pm: 253056 sm: 156544  <---512---> pm: 1835008 sm: 1542520

Of course such tools doesn't tell you exact values and you have to keep in mind that memory utilization is much more complex than a simple tool can show you. But as said it's very helpful to get a feeling.

Btw. I don't think reporting an out of memory problem is very helpful. Most of the time this is a problem of this specific system and specific setup and specific use case. Most of the time it's not a fault of a single application. And a lot of applications do not even report such failures but crashes silently or behave in unexpected ways. It's nice that FM/2 gives you the hint that there is something wrong on your system and it can't work as designed. But I'm pretty sure it's not FM/2s fault.

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: How to have quantity and quality of memory
« Reply #13 on: July 19, 2020, 11:34:28 am »
You still haven't said what you are trying to achieve with these settings.  It would also help if you described the computer you are using them on (mboard, CPU, memory etc.).
This is what I want to do, that until now I didn't
OS/2 can run more programs and use more data than can actually be stored in memory at any given time. This is done by swapping large amounts of memory to your hard disk and then reading the data back into memory when needed. This is called virtual memory.
Quote
My swapper.dat file hovers around 2 Mb regardless of what I do.
You have put the first two lines of the config-sys as is, and have increased the number in the swappath?

Quote
Since all my java programs are started from program objects I don't have java mentioned in my config.sys.
Neither do I

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: How to have quantity and quality of memory
« Reply #14 on: July 19, 2020, 01:41:30 pm »
I think it came with the above512 package but not sure anymore. With this little script it's easy to monitor memory usage without knowing the details of Theseus. I have it running all the time. So I get a feeling about memory consumption of different applications. And I see when memory runs out before it makes my system unstable.

Sample output here while some apps are running -
Code: [Select]
pm: 253056 sm: 156544  <---512---> pm: 1835008 sm: 1542520
pm: 253056 sm: 156544  <---512---> pm: 1835008 sm: 1542520
pm: 253056 sm: 156544  <---512---> pm: 1835008 sm: 1542520
This program seems silly to me, look what it shows me:
Code: [Select]
pm: 343680 sm: 265600  <---512---> pm: line, sm: /
pm: 343680 sm: 265600  <---512---> pm: line, sm: /
pm: 343680 sm: 265600  <---512---> pm: line, sm: /
pm: 343680 sm: 265600  <---512---> pm: line, sm: /
And EVERYTHING WORKS INCREDIBLY WELL for me. Except as always little nonsense, like the Seamonkey closes without asking you if you want to close open sales.
You commented days ago that this Atlassian application, I think I remember, ate the memory, after leaving the page open on the computer, leaving home and returning 1 or 2 hours, it appeared like this (attached photo). I had not lost memory, it remained.But their website failed.

For me the important thing is that others can replicate what I see.