Search  Users  Rules 
Forgot your password?
Login Register
Pages: 1
Default memory limit = 1GB, or does it?
Since memory limits are based on counting memory pages and since memory pages are 4096 bytes, not 4000 bytes shouldn't the default mem limit setting of 1 GB:

<mem limit="262144"></mem>

instead be:

<mem limit="256000"></mem>

# getconf PAGESIZE
Edited: Kevin Brooks - 17.01.2012 17:05:30

That would be correct if 1GB would be 1000MB. Of course, the binary gods ruled otherwise, and decided to make it 1024MB instead ;)
Of course, hard disk manufacturers are on your side, and soon will be moving to defining 1KB as 900 bytes.
You're right (GBs vs. GiBs). I just love computer "science" ;). Is it memory, bandwidth, or disk space? No wonder everyone wants to just go "unlimited". Sad to say that I've been doing this for a long time and even I get it wrong. I vote for a simplified config file that allows us to specify X MB or X GB so we don't have to think about page size or GiB vs. GB :).
Edited: Kevin Brooks - 18.01.2012 05:39:18
lvectl allows you to do just that. I actually don't recommend editing ve.cfg directly.
lvectl set LVE_ID --mem=1g --save
lvectl set LVE_ID --mem=256m --save

Will do all the conversion for you.
Pages: 1
Users browsing this topic (1 guests, 0 registered, 0 hidden)