Default memory limit = 1GB, or does it?
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Kevin Brooks
  2. 17.01.2012
  3.  Subscribe via email
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
4096
Rate this post:
  1. 17.01.2012 21:01:34
  2. # 1
Igor Seletskiy Accepted Answer
Posts: 1201
Joined: 09.02.2010
0
Votes
Undo
Kevin,

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.
  1. 18.01.2012 01:01:55
  2. # 2
Kevin Brooks Accepted Answer
Posts: 14
Joined: 10.08.2010
0
Votes
Undo
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 :).
  1. 18.01.2012 07:01:48
  2. # 3
Igor Seletskiy Accepted Answer
Posts: 1201
Joined: 09.02.2010
0
Votes
Undo
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.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.