1836104 Members
3576 Online
110089 Solutions
New Discussion

gig to byte conversion

 
SOLVED
Go to solution
jerry1
Super Advisor

gig to byte conversion

I would like to convert gig to bytes
For 3.75 gig I get 4026531840 bytes by:

3.75 x 1024 x 1024 x 1024

Why multiply 1024 3 times??
11 REPLIES 11
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: gig to byte conversion

Because "giga" means 10^9 or (1000 x 1000 x 1000). Next them 'puter idjits translated 1000 (10^3) is about the same as 2^10 (1024) so a a megabyte is not 1000 * 1000 (10^6) but is 2^20 (1024 * 1024).

In 'puter-speak "giga" does not mean 10^9 but 2^30.
If it ain't broke, I can fix that.
Chris Xu
Trusted Contributor

Re: gig to byte conversion

3.75 --> gigabytes
3.75 x 1024 --> megabytes
3.75 x 1024 x 1024 --> kilobytes
3.75 x 1024 x 1024 x 1024 --> bytes
Patrick Wallek
Honored Contributor

Re: gig to byte conversion

Oh goodness......

3.75 GB =

3.75 * 1024 = 3,840 MB

3,840 * 1024 = 3,932,160 KB

3,932,160 KB * 1024 = 4,026,531,840 Byte
Steven E. Protter
Exalted Contributor

Re: gig to byte conversion

Here is how I do it:

1,024,000,000 bytes
divided by 1024
is
1,000,000 Megabytes
divided by 1024
is
976.5625 Gigabytes

It works in the other direction as well.

SEP






Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: gig to byte conversion

If you need the whole scale:

8 bits = 1 byte
1,024 bytes = 1 Kilobyte (KB)
1,024 Kilobyutes = 1 Megabyte (MB)
1,024 Megabytes = 1 Gigabyte (GB)
1,024 Gigabytes = 1 Terabyte (TB)
1,024 Terabytes = 1 Petabyte (PB?)
1,024 Petabytes = 1 Exabyte (EB?)

And I've no idea what comes after exabyte.
jerry1
Super Advisor

Re: gig to byte conversion

The reason I ask is that oracle requires
the setting of kernel parm:

shmmax=size of RAM

Which needs to be converted from gig to bytes
for sam to take it.
MZ_1
Advisor

Re: gig to byte conversion

zettabyte
yottabyte
A. Clay Stephenson
Acclaimed Contributor

Re: gig to byte conversion

Be warned, if you set shmmax that high them there DBA's will feel duty bound to run SGA's that big. Set shmmax to what you think is a reasonable value --- most UNIX boxes find it necessary to do a few more things than Oracle. Of course, this doesn't stop them from running multiple instances of very large SGA's --- shmmax is a per shmid limit. Baseball bats are used to adjust SGA's in the latter case.

If it ain't broke, I can fix that.
Yogeeraj_1
Honored Contributor

Re: gig to byte conversion

hi,

Concerning SHMMAX, note that the Install Guide recommends specific values.

Previous versions of the Install Guide recommended setting SHMMAX to 0.5 *(physical memory present in machine).

Most recently it's been suggested SHMMAX be set to 4294967295 (4GB). This may not seem appropriate, particularly if the system has considerably less physical memory available, but it does prevent you from having to modify your system kernel every time a new instance is created or additional physical memory is added to the system. Remember that SHMMAX is
a high water mark, meaning that the OS will attempt to allow up to that amount for an application.

hope this helps too!

regards
yogeeraj

PS. 1024 = 2^10
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Steven E. Protter
Exalted Contributor

Re: gig to byte conversion

I've dealt with that with the 10G application server.

I'd set my shmmax to 1.5 GB on a 2 GB system.

Then I overrode the install complaint and 10G worked fine.

The I upgraded to 8 GB because 10G had us swapping like mad and still didn't update shmmax. 10G still worked.

So being precise probably won't matter based on experience.

If you don't go with a precise number, you can fire up glance/gpm and monitor shared memory use. I would be extremely surprised if you got close to 100% use of any shared memory resource.

If you do, you can use kmtume to up the shmmax figure dynamically without booting the box.

10G is a PITA, but I doubt you'll ever use as much shared memory as its asking for. The install program doesn't take into account other instances of apache, the database server or any of the other thousands of applications that could compete for shared memory.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Peter Nikitka
Honored Contributor

Re: gig to byte conversion

Hi,

this link contains some offical information about the schemes in the *Giga*-context:

http://physics.nist.gov/cuu/Units/binary.html

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"