Author Topic: RAM disk and temp folders...what else?  (Read 41967 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
RAM disk and temp folders...what else?
« on: April 13, 2018, 05:58:25 pm »
So for a number of years I used to run a 4Gig RAM machine build. Then a couple of months ago I read a thread on the forum regarding the configuration of a RAM disk and I thought: "heck, why not, let's give it a try"...LOL. I had two spare DDR3 sticks laying around, installed them, for a total of 8Gig, configured the RAM disk to use just 1Gig and it's been pretty good so far.

I use the RAM disk (ramfs.ifs) for the following:

1) ZIP file processing
2) PMMail
3) GCC

...but I think there is more opportunity there.

So I'm curious, if you have a RAM disk deployed, what are you putting on there?

For example, I have the following 'temp' directories currently defined in my CONFIG.SYS:

SET TMPDIR=G:\var\tmp
SET TEMP=G:\TMP
SET TMP=G:\TMP

I think I could readily point TMP and TEMP to my ramdisk...not so sure about TMPDIR. That location in the Unix world is meant to be a temporary persistent storage location, meaning, it should survive a re-boot but may be occasionally purged. So far the YUM/RPM install is using this and I'd rather not mess around with it. However, TMPDIR is used by GCC, so for now I also have this set in my GCC environment config file.

The TMP and TEMP on the other hand store a bunch of runtime stuff, for example Firefox always creates etilqs_xxx files there. I noticed that if FF crashes they remain behind, it appears to be safe to delete them, at least I occasionally do since they are supposed to be just temporary SQLITE database files.

What else though? Any suggestions?

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #1 on: April 13, 2018, 07:20:38 pm »
I had mentioned the following in another post.

I created a RAM drive named "X" that uses both low and high memory using ArcaOS 5.02 in the Computer\setup folder. I have it set to HPFS.

I moved my temporary directories to my RAM drive in my config.sys.
SET TMP=x:\temp
SET TEMP=x:\temp
SET TMPDIR=x:\temp

I also operate my system with my OS2.INI and OS2SYS.INI moved to my RAM drive during operatiion using a program called UPDINI12a.zip.

http://hobbes.nmsu.edu/download/pub/os2/util/wps/updini12a.zip

rem SET USER_INI=D:\OS2\OS2.INI
SET USER_INI=X:\TEMP\OS2.INI
rem SET SYSTEM_INI=D:\OS2\OS2SYS.INI
SET SYSTEM_INI=X:\TEMP\OS2SYS.INI

RUN=D:\OS2\UPDINI.EXE D:\OS2\ 10

Because I use this program, I added the following line as the first line in my config.sys.

CALL=D:\OS2\XCOPY.EXE D:\OS2\OS*.INI D:\VAR\TEMP /T /R /O

This backs up both files during bootup to another location in cause something drastic were to happen. I also archived my system before and after I made all these changes.
« Last Edit: April 13, 2018, 07:22:46 pm by David Graser »

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #2 on: April 13, 2018, 08:14:57 pm »
Hi David!

...I also operate my system with my OS2.INI and OS2SYS.INI moved to my RAM drive during operatiion using a program called UPDINI12a.zip.

http://hobbes.nmsu.edu/download/pub/os2/util/wps/updini12a.zip
...

Yes, I do remember reading this. I think the move of the OS2 INI files is a neat idea. Quite frankly though I would be very hesitant to do so only because these files (in my experience) are so sensitive to any changes. In particular the lack of an orderly "shut-down" functionality of the RAM disk storage which would allow you to bring these files back onto the disk in a major problem for me.

My INI files are often corrupted...and this is with just regular system use. Subsequently upon re-boot I often find that I bookt to messed-up Desktop and most WarpCenter icons being gone. This requires a shut-down, followed by a restore of the last good version, etc, etc...which I of course have, but it is tedious to say the least. All this happens despite the fact that I routinely run checkni and otherwise attempt to maintain them.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #3 on: April 13, 2018, 08:25:58 pm »
Quote
I use the RAM disk (ramfs.ifs) for the following:

RAMFS.IFS is not very good, compared to the RAMDISK supplied by ArcaOS (or QSINIT). RAMFS.IFS uses real memory (from the 3.5 GB that OS/2 knows about). The ArcaOS, or QSINIT, RAMDISK will use memory above that limit. I use the ArcaOS RAMDISK, formatted as HPFS, and make the HPFS cache as small as possible (64 KB), so it doesn't get used much (the cache slows the RAMDISK, it would be faster without the cache, but HPFS insists on at least 64KB). I use JFS for my real disk, except for a FAT32 drive for communicating with windows. Using JFS seems to prevent a LOT of file corruption because of the way it works.

Quote
I use the RAM disk (ramfs.ifs) for the following:

1) ZIP file processing
2) PMMail
3) GCC

I am not sure what you are doing with these. If you zip a file to RAMDISK, you then need to copy it to a real disk, or it will be gone when you reboot. PMMail can use the RAMDISK for temporary files. It is probably not a good thing to use it for accounts etc. What do you do with GCC (which should be managed by RPM/YUM)?

Quote
I think I could readily point TMP and TEMP to my ramdisk...not so sure about TMPDIR.

I put all three to my RAMDISK. The big advantage is that it gets cleaned up at every boot, and you do need to remember that small detail.

The big disadvantage of using a RAMDISK, is that you need to load it when (actually before) the system starts, and copy anything that you want to keep, before the system is shut down (the ArcaOS / QSINIT RAMDISK, can, sometimes, retain data over a warm boot, but you can't count on that).

I have tried a number of things, but the only thing that is really safe, is to use it for the %TEMP% stuff.

Quote
I also operate my system with my OS2.INI and OS2SYS.INI moved to my RAM drive during operatiion using a program called UPDINI12a.zip.

Personally, I wouldn't even consider doing that. There are enough problems with maintaining the INI files, without complicating things by putting them on volatile storage.

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #4 on: April 13, 2018, 09:37:56 pm »
I have used it for over a month with system hangs at times and it continues to work fine.  My machine is not a critical mission machine.  I have little to worry about and with the safeguards I have taken, I am not concerned.  I am always testing and experimenting with my system. 

David

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #5 on: April 13, 2018, 10:09:53 pm »
Hey Doug!

Quote
I use the RAM disk (ramfs.ifs) for the following:

RAMFS.IFS is not very good, compared to the RAMDISK supplied by ArcaOS (or QSINIT). RAMFS.IFS uses real memory (from the 3.5 GB that OS/2 knows about). The ArcaOS, or QSINIT, RAMDISK will use memory above that limit.

Hmm...truth be told I never thought to pay enough attention during my testing to see where the memory being used by the ramdisk comes from. Buy yeah, you are right, I just moved a massive (600MB) video file over and yikes...not happy with the results!!!

OK, so I'm going to give the AOS RAMDISK a try...looks like EXE only, do you just toss that into your CONFIG.SYS and either RUN or CALL from there? I figured a run from there would be best to start up as early as possible, and if not then maybe startup.cmd?

Quote
I use the RAM disk (ramfs.ifs) for the following:
1) ZIP file processing
2) PMMail
3) GCC

I am not sure what you are doing with these. If you zip a file to RAMDISK, you then need to copy it to a real disk, or it will be gone when you reboot. PMMail can use the RAMDISK for temporary files. It is probably not a good thing to use it for accounts etc. What do you do with GCC (which should be managed by RPM/YUM)?

Ahhh, sorry, this needs more explanation for sure:

1) ZIP processing - I use 'RPF Zip Control', it's a GUI for one of the standard un/zip utils...so each time I open up a ZIP file it creates a temp dir and usually tosses some stuff in there. Clearly stuff I do not care to keep afterwards and would want it to run as quickly as possible. So when you open up a large ZIP, say something like the OS/2 Toolkit for example, the RAMDISK makes a huge difference

2) PMMail - just the standard attachments that you open up in the email, I see pmmail dumps them out into a file, so similar approach to #1 above, but because the filesizes are so much smaller it's barely perceptible

3) GCC - ahh, this is the biggest beneficiary actually...running any compile process (as I have it setup right now) causes the various object files to be created, I'm simply telling GCC to use the ramdisk instead of the disk, literally this almost gives a feel of an all in-memory process short of reading the sources and libraries

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #6 on: April 13, 2018, 10:39:14 pm »
Ooppss ==> CORRECTION!!!

Hey Doug!

Quote
I use the RAM disk (ramfs.ifs) for the following:

RAMFS.IFS is not very good, compared to the RAMDISK supplied by ArcaOS (or QSINIT). RAMFS.IFS uses real memory (from the 3.5 GB that OS/2 knows about). The ArcaOS, or QSINIT, RAMDISK will use memory above that limit.
...
OK, so I'm going to give the AOS RAMDISK a try...looks like EXE only, do you just toss that into your CONFIG.SYS and either RUN or CALL from there? I figured a run from there would be best to start up as early as possible, and if not then maybe startup.cmd?...

Well, so I created a ramdisk using the AOS RAMDISK.EXE, re-did the test and discovered the same pattern of usage. Hmm...scratched my head and had a closer look at my RAMFS.IFS setup...as it turns out it is the very same RAMDISK.EXE that comes with AOS....so I'm a little confused Doug about your comment re: "RAMFS.IFS is not very good...".

Looking at the README with RAMFS it specifically calls out the install of RAMFS.IFS and creation of a disk with RAMDISK.EXE, which is precisely what I do today. I am not sure how the AOS process would be any different?

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #7 on: April 13, 2018, 11:08:06 pm »
I used ramfs for quite a while and it works well, the memory it allocates is swappable and doesn't affect things like shared memory. The problem is that it doesn't quite work right with symlinks for some reason.
Under System Setup, there is a ramdisk icon, this will allow you to use the memory above 4GB (actually more like 3.5GB) as a ram disk, so you should have something like a 4.5GB ram disk once you set it up. Depending on your system, this memory may survive a warm reboot as well, it does here.
You should be able to use it much like you use the ramfs volume, including putting tmpdir on it. Most Linux systems use a similar file system (tmpfs) for /tmp and I believe point tmpdir at it.

Andy Willis

  • Sr. Member
  • ****
  • Posts: 292
  • Karma: +7/-0
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #8 on: April 14, 2018, 12:29:29 am »
I didn't use ramdisk.ifs much because it used otherwise valuable memory.  With the ramdisk in AOS, I have a 20MB ramdisk used from otherwise unused memory.  I have my swappath set to it as well as temp and Mozilla temp space.  My primary reason for using it for these is to limit writes to my SSD.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #9 on: April 14, 2018, 07:55:56 am »
I see that Dave pointed you to the setup for the AOS RAMDISK. It is part of the new OS2LDR. RAMFS.IFS may be included in ArcaOS, but I recommend not using it.

Quote
1) ZIP processing - I use 'RPF Zip Control'

Ouch. That is an ancient program, that I quit using many years ago, simply because there are better ways to do zip/unzip. ARCHIVE Tool is one of them, and it is part of ArcaOS.

Quote
2) PMMail - just the standard attachments that you open up in the email, I see pmmail dumps them out into a file, so similar approach to #1 above, but because the filesizes are so much smaller it's barely perceptible

PMMail (3.x) has a setting to point to the drive, and directory, that you want to use for temporary files. Where it makes the biggest difference, is when you use the option to compress the message files, in a folder.

Quote
3) GCC - ahh, this is the biggest beneficiary actually...running any compile process (as I have it setup right now) causes the various object files to be created, I'm simply telling GCC to use the ramdisk instead of the disk, literally this almost gives a feel of an all in-memory process short of reading the sources and libraries

Okay. I thought that is probably what you meant, but what you said could confuse people.

Quote
I used ramfs for quite a while and it works well, the memory it allocates is swappable and doesn't affect things like shared memory. The problem is that it doesn't quite work right with symlinks for some reason.

Actually, there are a lot of things that don't work quite right, with RAMFS.IFS. I don't remember the details, but it wasn't possible to use it with some program that I was using when I found out about the limitations. The ArcaOS RAMDISK (which is the same as what QSINIT uses) is far better, and it can use the HPFS file system (it is one of the settings), which gives it the full capability of the HPFS file system. If you have enough memory, you can use more than one RAMDISK, with different file systems, but I can't think of any good reason to do that. The memory above 4 GB also has a method to use it as program storage (when not using it as a RAMDISK), but it needs an API to make that more useful. (look it up in the QSINIT documentation).

Quote
I didn't use ramdisk.ifs much because it used otherwise valuable memory.  With the ramdisk in AOS, I have a 20MB ramdisk used from otherwise unused memory.  I have my swappath set to it as well as temp and Mozilla temp space.  My primary reason for using it for these is to limit writes to my SSD.

The AOS RAMDISK is most useful when you have more than 4 GB of memory. I have 8 GB of memory, and use a 4.5 GB RAMDISK, without taking more than a few bytes (for the driver), away from my main memory. When you have 4 GB of memory, for OS/2, you will never swap. I would suggest, that 20 MB is pretty small, for a swap disk. One of my systems is only 3 GB, and I allocate a 1 GB RAMDISK from it, but I don't use it for swapping, mostly because a 2 GB machine will rarely swap anyway, and if it does, 20 MB isn't going to help much.

Ben

  • Guest
Re: RAM disk and temp folders...what else?
« Reply #10 on: April 15, 2018, 03:43:56 pm »
I am just wondering if I have this straight; is the RAMDISK.exe that comes with the RAMIFS the same RAMDISK.exe that comes with ArcOS?

There seems to be some debate.

Right now I'm using RAMIFS loaded via CONFIG.SYS but if there is something better or issues with the former...

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #11 on: April 15, 2018, 05:33:15 pm »
Hey Ben!

I am just wondering if I have this straight; is the RAMDISK.exe that comes with the RAMIFS the same RAMDISK.exe that comes with ArcOS?

There seems to be some debate....

LOL, great question...that was precisely what I was pointing out in my previous response to Doug's recommendation to use just RAMDISK.EXE. The RAMFS package which I have installed here is composed of:

1) RAMFS.IFS
2) RAMDISK.EXE

The README specifically instructs you to deploy RAMFS.IFS and use RAMDISK.EXE for the more "advanced" features, literally, here is the quote from the document:

Code: [Select]
...
Installation and use
~~~~~~~~~~~~~~~~~~~~
Add "IFS=d:\path\RAMFS.IFS" to CONFIG.SYS and reboot. During boot, it will
show a short version message.

Then, from an OS/2 prompt, use RAMDISK.EXE to create a RAM drive. To create a
drive R:, type "RAMDISK R:" To have a RAM drive created at every boot, you
can add "CALL=d:\path\RAMDISK R:" to CONFIG.SYS.
...

I have AOS 5.0.2 here, so all my comparisons are done against the install media only (no actual live installation) and all I can find is the RAMDISK.EXE file. Comparing that file to the one included in the RAMFS package yields a match, so they are the same files.

My suspicion therefore is that the use of RAMDISK.EXE is meant to allow you to create additional ramdisks following system boot, since you clearly could not mount RAMFS.IFS once you are up-and-running. That makese sense.

So my question is: can someone look up the details of the AOS configuration? As Dave Yeo pointed out:

Quote
...Under System Setup, there is a ramdisk icon, this will allow you to use the memory above 4GB...

???

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #12 on: April 15, 2018, 06:38:03 pm »
Quote
LOL, great question...that was precisely what I was pointing out in my previous response to Doug's recommendation to use just RAMDISK.EXE. The RAMFS package which I have installed here is composed of:

1) RAMFS.IFS
2) RAMDISK.EXE

The README specifically instructs you to deploy RAMFS.IFS and use RAMDISK.EXE for the more "advanced" features, literally, here is the quote from the document:

You seem to have completely missed the fact that the recommended RAMDISK has nothing, at all, to do with RAMFS. It is a completely NEW RAMDISK, based on the QSINIT project (look it up, if you feel that is necessary).

REMOVE all references to RAMFS. Then go to System Setup, and run the RAM Disk program to configure it. I recommend using the HPFS selection for most things. You will not find any IFS for it, since it exists in the new OS2LDR. You do need the BASEDEV=HD4DISK.ADD line, in CONFIG.SYS, but the RAM Disk program will do that for you.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #13 on: April 15, 2018, 06:58:45 pm »
Doug,

...oh boy... ::)

You seem to have completely missed the fact that the recommended RAMDISK has nothing, at all, to do with RAMFS. It is a completely NEW RAMDISK, based on the QSINIT project (look it up, if you feel that is necessary)...

I think it is you who have completely missed that fact that I am NOT running AOS...so the whole time you have been responding in this thread you are making a massive assumption that not just myself, but perhaps others as well, Ben for example, are running AOS. Meanwhile, I have clearly stated that I have not deployed AOS, I am running W4.52 FP6, 201SMP kernel (if you must know).

Sooo...that means the following:

1) QSINIT is not part of my install, unless i manually deploy it, which I have not done
2) RAMFS package deployed on my machine is composed of two elements:
- RAMFS.IFS
- RAMDISK.EXE

Therefore, given the above and having hopefully set the matter straight, is it starting to come together that regardless of what you say here, unless I have AOS deployed and can test/verify/assess I simply can not deploy your suggested setup regardless of how many times you tell me "...RAMDISK has nothing, at all, to do with RAMFS. It is a completely NEW RAMDISK...".

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: RAM disk and temp folders...what else?
« Reply #14 on: April 15, 2018, 07:26:23 pm »
It's easy to lose track of which versions of OS/2 people are running :)