Author Topic: Virtualaddresslimit and Disk Free space, Questions  (Read 7435 times)

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Virtualaddresslimit and Disk Free space, Questions
« on: November 07, 2018, 04:49:06 pm »
The first question is about the virtualaddresslimit, if I have a computer that the xcenter shows me 3430mb free when start,
and the pmview tells me that I have 3511mb, why can not I say a value in the config.sys higher than 3072mb?
Could it change after starting?


The other question is the free space on disk, according to the program you run shows me very different values, which is the correct one? , if any is right?
With rexx:
'Disk='SysDriveInfo('d:')
show               free                          total
Disk=D:  389265612800 524237774848 DATS

With chkdsk:
chkdsk show disk space is       511 999 548K
but space available                   380 143 256K -389 265 612K = 9,12 GB dif.!!!!

With DFSEE show:
Bitmap sect range : 0x3D0780D0 =  499952 MiB  Freesp : 0x2D5104F0 =  371232 MiB
        ┌────────────────────────────────────────────────────────────────┐     
00000000│▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▒▓·                                             ·│ 25% 
        └────────────────────────────────────────────────────────────────┘     
Total / Used size : 0x3D08FC78 =  499999 MiB / 0x0FB6FB10 =  128735 MiB  25.7% 

SysDriveInfo       -          Dfsee
389 265 612 800 - 371 232 000 000=18 033 612 800   18,03 gb dif.

Something seems not right?
saludos

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Virtualaddresslimit and Disk Free space, Questions
« Reply #1 on: November 07, 2018, 05:05:04 pm »
Virtualaddresslimit is the amount of virtual address space available to a program out of the 4GBs that our processors support. Some of the address space is used by the kernel and devices such as video memory, which is why the max is 3072 and is lower on some systems (to be stable). This is different from the amount of ram you have installed as it is virtual and can exist in your swap file or even as unallocated memory. As well different processes use the same virtual addresses in some cases.
eg you could have only 512 MBs of ram and have 2 programs using 1 GB of memory. Lots of swapping but the programs would each see that they have access to a GB.

There are different ways to measure disk space (and ram etc), some use a MB to mean 1,000,000 bytes as this makes a hard disk look bigger and some use a MB to mean 1,048,576 bytes. Now some (Dfsee) use MiB to mean 1,048,576 bytes and MB to mean 1,000,000 bytes.
Basically the marketers have changed the original meaning of MB as 1,048,576 to 1,000,000 to inflate sizes of HDs etc.

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: Virtualaddresslimit and Disk Free space, Questions
« Reply #2 on: November 07, 2018, 07:57:27 pm »
Thanks, Dave
In conclusion with the sysdriveinfo, I will have to multiply it by 0.95367488223 approximate average, to know the real value closest to reality.

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: Virtualaddresslimit and Disk Free space, Questions
« Reply #3 on: November 09, 2018, 12:33:55 am »
All disk (new) have a size base on official unit base on a classic mathemat value  1000 B for 1 KB and so on... (like 1 Kg etc...)
At origin due to binary mode, 1 KB was 1024 bytes and then it was renamed to KiB for kilo binary bytes and so on (both can be used but to have a bigger value and space on a disk, it is more interesting to use MB or GB instead of MiB or GiB as DAve wrote, marketing) 

1 GiB = 1024 MiB = 1024 x 1024 KiB = 1024 x 1024 x 1024 Bytes
1 GiB = 1024 MiB =  1,048,576 KiB = 1,073,741,824 Bytes

Why 1024 ?
binary >  1024 - 512 - 256 - 128 - 64 - 32 - 16 - 8 - 4 - 2 - 1

   

xynixme

  • Guest
Re: Virtualaddresslimit and Disk Free space, Questions
« Reply #4 on: November 09, 2018, 02:38:06 pm »
1 KB was 1024 bytes and then it was renamed to KiB for kilo binary bytes

FWIW: https://en.wikipedia.org/wiki/Kibibyte. A "new" standard, so perhaps a few authors have to insert that ï".

xynixme

  • Guest
Re: Virtualaddresslimit and Disk Free space, Questions
« Reply #5 on: November 09, 2018, 02:51:50 pm »
'Disk='SysDriveInfo('d:')
389265612800

With chkdsk:
but space available                   380 143 256K

With DFSEE show:
Freesp : 0x2D5104F0 =  371232 MiB

FWIW and rounded down. All numbers divided by 1024 until the result is less than 1024, so the final unit is the same:

389265612800 / (1024 * 1024 * 1024) = 362.53 units
380143256 / (1024 * 1024) = 362.53 units
371232 / 1024 = 362.53 units

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: Virtualaddresslimit and Disk Free space, Questions
« Reply #6 on: January 23, 2019, 11:09:55 pm »
why can not I say a value in the config.sys higher than 3072mb?
Could it change after starting?
[L:\]set virtualaddresslimit=null

[L:\]set virtualaddresslimit
VIRTUALADDRESSLIMIT=null
[L:\]set virtualaddresslimit=4096

[L:\]set virtualaddresslimit
VIRTUALADDRESSLIMIT=4096
Thanks for all the answers, finally I understood the space in the hard drives.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Virtualaddresslimit and Disk Free space, Questions
« Reply #7 on: January 23, 2019, 11:14:08 pm »
VAL is a kernel instruction. You have to set it in CONFIG.SYS. While you can set environment variables in CONFIG.SYS and in a command line or in any other environment, the other lines of CONFIG.SYS can't be set from outside.

Environment variables have a preceded SET. Note the difference for all kernel instructions. If you open a command prompt and type SET, you'll get all environment variables that are defined for the current environment, while CONFIG.SYS environment variables are global. You won't find a line with VIRTUALADDRESSLIMIT in the output of the SET command.

BTW: The main problem with OS/2 and huge applications like Mozilla or AOO is that they consume a huge amount of shared memory. If you don't make them use higher memory above 512 MB, you most likely can't make them run for a longer time. Higher memory address space is required for them, mainly for shared memory. You can tag DLLs to use higher memory over 512 MB with a "newer" kernel. VAL should be set to a maximum value. Its maximum is 4096, but a value over 2048 seems to make problems for many.

Set it to 2048 if you have a few hundreds MB more physical RAM. Install a new kernel and load Mozilla DLLs (mainly XUL.DLL) and AOO DLLs high (with HIGHMEM.EXE or ABOVE512.EXE). For Mozilla, use also Dave's mozturbo to improve the time until Mozilla traps. As an alternative, you could also try an OS/4 kernel.

The hard disk space can't be related to that. The above handles about address and memory space.
« Last Edit: January 23, 2019, 11:47:24 pm by Andreas Schnellbacher »

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: Virtualaddresslimit and Disk Free space, Questions
« Reply #8 on: January 25, 2019, 10:53:14 pm »
You can not really put a value greater than 3072 in virtualaddresslimit. If I modify it in the config.sys, it gives me a SYS1196 error and puts the value of 1024.
I would like to experiment with a higher value, but I can not, that's all.
The kernel is 14201-smp, arcaos503
On the other hand I read in a document of OS / 2 2.1,:
Virtual memory addressing to 64 TB

With reference to space hard drives, it's another idea

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Virtualaddresslimit and Disk Free space, Questions
« Reply #9 on: January 25, 2019, 11:50:49 pm »
You can not really put a value greater than 3072 in virtualaddresslimit. If I modify it in the config.sys, it gives me a SYS1196 error and puts the value of 1024.
I would like to experiment with a higher value, but I can not, that's all.
The kernel is 14201-smp, arcaos503
On the other hand I read in a document of OS / 2 2.1,:
Virtual memory addressing to 64 TB

Yes, the i386 is capable of 64TBs Virtual memory I believe. The way this works is that you can have multiple process each using 3GBs of address space and use the swap file I guess to take up the access. There's also the difference between allocating memory and committing it. My understanding is that only when committed does it actually use ram.
In practice, from experimentation, OS/2 is limited by using signed (and unsigned?) 32 bit data structures. for example I managed to crash OS/2 with a swap file full error when the swap file grew over 2GBs with lots of room on the drive. I had 1.5 GBs of real ram at the time and was linking a debug version of xul.dll, which did need the full 3GBs of address space and would fail unless VIRTUALADDRESSLIMIT was set at 3072.
So there is address space, how much memory a process sees, which is set by VIRTUALADDRESSLIMIT. And virtual memory, so multiple processes can each use that same address space.