Author Topic: Tweaking eCS for low memory system  (Read 21293 times)

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Tweaking eCS for low memory system
« on: January 02, 2014, 02:16:35 pm »
As low memory is no problem with standard hardware for eCS since years I forgot how to tweak OS/2 - eCS for such situations. I've searched a while but did not get very much information except the obvious ones - cache sizes.

What I want to do is to tune eCS for a Pentium like system with 266MHz and 64MB memory. This is a small board which boots eCS from a 16GB CF-Card and works reasonable well. I reduced HPFS cache, disabled CDROM support, remed out all DOS network drivers, disabled JFS... But eCenter still shows about >56MB used and 6MB swapper size after startup.

Any pointer to documentation about appreciated.

Basically what I need is - WPS, and network. Maybe I should deinstall Netbios as TCP/IP is probably enough for me. But does anyone know how much this will lower memory utilization?

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #1 on: January 02, 2014, 06:55:51 pm »
It's been so long since I've thought about it :) One thing that comes to mind is to lower the number of threads in config.sys

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #2 on: January 02, 2014, 07:57:34 pm »
Quote
I've searched a while but did not get very much information except the obvious ones - cache sizes.

Those would be the most useful ones. I think you have done most of what is needed, except to make the initial swap file size larger, to prevent thrashing. You have what used to be considered a "huge" hard disk (16 GB), use some of it for a big swap file (perhaps 200 meg would be a good starting point). Also, remember that you should measure the free real memory, after doing something that will force all the swapable parts to swap out, and stay there.

64 meg of memory was considered to be "huge" at one time, but programs were also written to handle low memory. Try to eliminate memory hogs, and use older programs, when they will do the job.

Quote
But eCenter still shows about >56MB used and 6MB swapper size after startup.

Hmmm. Have you considered NOT using eWorkPlace (XWorkPlace)? I think that uses a lot of memory. Any other add ons (DragText, nice, etc.) also use memory. Basically, if it wasn't part of Warp 3, don't use it.

A good chunk of OS/2 will swap out, and stay there until needed (usually error handlers), unless the initial swap size is too small, which will cause it to be swapped back in again. You still have lots of memory, but some of it will need to be swapped out, before it can be used, then, it will swap back in again, if the initial swap file size is too small. Of course a program like FireFox will eat up 64 meg of memory, just starting up.

Quote
Maybe I should deinstall Netbios as TCP/IP is probably enough for me. But does anyone know how much this will lower memory utilization?

I don't think it will be a lot. NETBIOS was designed to run in what we now call "low memory" situations, and I think a lot of it will swap out, and stay there, until needed. It is pretty easy to remove it, and put it back again, to see what happens.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #3 on: January 02, 2014, 11:19:14 pm »
As low memory is no problem with standard hardware for eCS since years I forgot how to tweak OS/2 - eCS for such situations. I've searched a while but did not get very much information except the obvious ones - cache sizes.

Usually the main problem is Shared Memory. Even when I can't explain it in theory, advancing the FS Caches led sooner to critical situations, up to non-booting systems.

Quote
What I want to do is to tune eCS for a Pentium like system with 266MHz and 64MB memory.

OK, probably you don't have a HD from the times when such amount of RAM was standard. Don't use the deafult values and lower the FS cache. Read "Die OS/2-Akten" from Christian or maybe ConfigTool has also some info on that.

Quote
Basically what I need is - WPS,

Warp 3 probably used less mem.

Quote
and network.

Then it seems like Warp 4.5x is recommended.

Sorry, no other info from here.

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #4 on: January 03, 2014, 01:16:45 pm »
Quote
"Die OS/2-Akten"
All links I found points to http://www.os2world.com/os2files/ which seems to not exist anymore  :(

Quote
Caches
currently I use 2MB for HPFS. Tried 1MB but think 2MB is better. 16GB is not that small but it works only in non Busmaster modes (!BM). So disk speed is not as fast as I would like it.

JFS is remed out as it seems not to work on this system. Guess chkdsk for JFS produces my 'No swap space left' traps so changed all partitions back to HPFS.

FAT - current setting DISKCACHE=128,LW,32. Advices for better setting?

CD-ROM is remed out as it does not work anyway.

Code: [Select]
SWAPPATH=t:\OS2\SWAP_M 2048 16394As suggested I will increase this further.

Code: [Select]
THREADS=512
VIRTUALADDRESSLIMIT=512
Should I lower this further?

Quote
NETBIOS
I forgot to mention this is a copied installation from a Server (Server from ACP2 over eCS2.0beta4). Maybe reverting back to simple PEER will save some memory but not sure how much. 'Net stop server' frees about 4MB.

Quote
eWorkplace
Any clue how much can be saved when removing it? Fears when I deinstall and install again all my settings are lost. Ok, can make a backup before.

Btw. any good tool to see how much memory each process uses?
« Last Edit: January 03, 2014, 01:21:26 pm by Andi B. »

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #5 on: January 03, 2014, 06:36:47 pm »
Quote
currently I use 2MB for HPFS. Tried 1MB but think 2MB is better. 16GB is not that small but it works only in non Busmaster modes (!BM). So disk speed is not as fast as I would like it.

Since the disk is slow, a bigger cache should help performance. It is probably worth using memory for that.

Quote
FAT - current setting DISKCACHE=128,LW,32. Advices for better setting?

This is probably okay, if you actually use FAT. If you don't, try DISKCACHE=64 (the memory saving is minimal, but every byte can count).

Quote
Should I lower this further?

Threads can probably be 256, or even 64 (apparently, the default), without too much of a performance hit. Just don't try running more than a couple of programs concurrently. VIRTUALADDRESSLIMIT seems to be optimal at 1536, in most cases. You can try it at 512, but I would think that 1024 would be better.

Quote
Maybe reverting back to simple PEER will save some memory but not sure how much. 'Net stop server' frees about 4MB.

I am not sure if 'Net stop server' frees all of the memory. I suspect that the only way to find out how much difference it would make, would be to record the amount of memory use with it, and without it. The "problem" with doing that, is to try to measure the real memory usage under exactly the same conditions, because you may see completely bogus numbers, depending on what gets swapped out before you look at the numbers. If you don't need the server, don't start it. The Requester should communicate with other machines.

Quote
Btw. any good tool to see how much memory each process uses?

According to Theseus (THE tool to use - System-> RAM Usage by Process), XWPDAEMN.EXE uses 848K of private memory, plus 328K of shared memory (on my system, which is actually eWorkPlace. You may see different numbers). There might be more to it, but without deinstalling it, I can't say for sure.

I got Theseus from ftp://service.boulder.ibm.com/ps/products/os2/fixes/v4.5warp/theseus4/thes4001.exe (it looks like it is still there). There is a version 3, for older versions of OS/2.

Sergey Posokhov

  • Full Member
  • ***
  • Posts: 169
  • Karma: +8/-6
    • View Profile
    • OS/2 API Research
Re: Tweaking eCS for low memory system
« Reply #6 on: January 14, 2014, 02:17:33 pm »
Quote
Code: [Select]
THREADS=512
VIRTUALADDRESSLIMIT=512
Should I lower this further?

Try to set "PROCESSES=..." in Config.sys:
http://ru2.halfos.ru/core/docs/VirtualAddressLimit-back-side.html

Fahrvenugen

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +4/-0
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #7 on: January 14, 2014, 07:54:50 pm »

Quote
Basically what I need is - WPS,

Warp 3 probably used less mem.

Hi,

I keep a couple of copies of Warp 3 around, and yes - it does run nicely on low memory systems.  I have found that in many cases (depending on the application) it performs better then Warp 4 / eCS.

It *can* run on systems with as little as 4 MB, although it swaps constantly and runs very slowly.

I've had it run smoothly on systems with as little as 16 MB (with lots of tweaking), although don't expect to run more modern apps on a 16MB system. 

For Warp 3, once you hit 64 MB the system starts to really fly (although if you go above 64 MB you may need to run the patchldr utility to patch the loader so it will see memory above 64 MB).

One thing to note though - I've never tried booting Warp 3 from a CF card,  I have no idea if that is even possible.
« Last Edit: January 14, 2014, 07:56:30 pm by Fahrvenugen »

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #8 on: January 15, 2014, 04:43:13 am »
Quote
Try to set "PROCESSES=..." in Config.sys:

Note that PROCESSES must be, at least, one more than THREADS.

Quote
I keep a couple of copies of Warp 3 around, and yes - it does run nicely on low memory systems.

I would consider using Warp3 (with all of the updates) in this case. It has a much smaller footprint. It also has a few limitations, but it should work well in 64 meg, and a slow 16 GB disk (which is probably just as fast as the 16 MEG disks that were used when Warp3 was new). Warp4 should also work okay, but I would not even consider using XWorkplace in that setup.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #9 on: January 15, 2014, 08:33:57 pm »
Quote
"Die OS/2-Akten"
All links I found points to http://www.os2world.com/os2files/ which seems to not exist anymore  :(

Shit. Use http://archive.org/web/ But now I doubt that it contains hints about to set it up for low mem.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #10 on: January 15, 2014, 08:52:06 pm »
Some more ideas:
  • Remove DOS stuff from CONFIG.SYS.
  • Remove multimedia, esp. the WPS classes.
  • Remove printing from CONFIG.SYS.
  • Remove TTF support from CONFIG.SYS.
  • Lower the number of installed fonts and use only bitmap fonts.
  • Disable folder backgrounds.
  • Clean inis, also remove icons with Rich's tool.
Of course uninstalling XWP would probably have the greatest effect. ;-)

Fahrvenugen

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +4/-0
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #11 on: January 16, 2014, 07:02:51 pm »
I seem to recall that in one of my collections of  books I have a "inside os/2 2.1" and a "Warp 3 certification" book, both of which I think had tips for optimizing for low memory systems.

I'll have a look and see if I can find those books, I'm sure the tips all apply to Warp 4 / eCS.


Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #12 on: January 18, 2014, 02:07:04 pm »
Thanks for all the info. Have to do more tests especially the fonts and MM stuff aschn suggested. To give you a clue what the hardware looks like, here is a picture. It measures 67x50mm and uses about 3W only. TFT, VGA, PCI, PS2, COM, LPT, USB, Intel LAN, IDE, Audio....  interface is onboard.

It's not necessary to use Warp 3 for this. This hardware has 64MB and it runs quite good with eCS and even with the server started. In the meantime I found a version with even 128MB. XWP shows about 70MB free after boot. Boot time from the CF-card is about 1:30 to 2 minutes which is acceptable as I plan to let it run all the time.

Currently I test this board on top of an evaluation kit which routes all signals to standard connectors. Next thing I've to do is making cables to attach a 1024x768 LCD instead the analog monitor. I've not decided yet if I should use the evaluation board for my final application or build my own interface for the parts I need. Target is to have a very low power OS/2 machine which seems to be possible with this board.

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #13 on: January 18, 2014, 10:01:29 pm »
Andi, that looks very interesting.  Could you say what it is and who the manufacturer is and where can I get specifications and manuals for it?

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Tweaking eCS for low memory system
« Reply #14 on: January 18, 2014, 11:20:14 pm »