Default memory limit = 1GB, or does it?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brooks
    Junior Member
    Forum Explorer
    • Mar 2021
    • 21

    #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 the default mem limit setting of 1 GB:

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

    instead be:

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

    # getconf PAGESIZE
    4096
  • iseletsk
    Senior Member
    • Dec 2017
    • 1199

    #2
    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.

    Comment

    • brooks
      Junior Member
      Forum Explorer
      • Mar 2021
      • 21

      #3
      You
      e 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 Ive 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 have to think about page size or GiB vs. GB .

      Comment

      • iseletsk
        Senior Member
        • Dec 2017
        • 1199

        #4
        lvectl allows you to do just that. I actually don 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.

        Comment

        Working...