Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Xen PV wrong memory amount

ZeroZero Member
edited February 2012 in Help

Hello all,

I've bought a Xen PV VPS with 512 MB of RAM and 512 MB of Swap, but when I execute free -m I see:

total used free shared buffers cached
Mem: 497 46 451 0 1 22
-/+ buffers/cache: 21 475
Swap: 511 0 511

Is reserved by the kernel or what?
I haven't had this problem with others Xen VPS.

But if I reload the VPS using the CentOS 5 i386 template I get 512 MB of RAM...
The CentOS 5 template is the only that "works".

Is something that I can fix?

Comments

  • netomxnetomx Moderator, Veteran

    What is the problem?

  • ZeroZero Member
    edited February 2012

    Where are the remaining 15 MB of memory?

  • @netomx said: What is the problem?

    Im guessing its because the VPS shows 497MB of RAM, when he should have 512MB.

  • KuJoeKuJoe Member, Host Rep

    I believe that is caused by PyGrub, if you use a 64bit OS you should have more available RAM than a 32bit OS. I didn't test this extensively but I think that's the reason.

  • @KuJoe said: I believe that is caused by PyGrub, if you use a 64bit OS you should have more available RAM than a 32bit OS. I didn't test this extensively but I think that's the reason.

    You can also use PAE to address the full memory amount.

  • ZeroZero Member
    edited February 2012

    I get even less memory with CentOS 6 x86_64

    total used free shared buffers cached
    Mem: 489 67 422 0 1 22
    -/+ buffers/cache: 43 446
    Swap: 511 0 511

  • netomxnetomx Moderator, Veteran

    Can I ask why are you using 64 bits on a 512MB VPS ?

  • KuJoeKuJoe Member, Host Rep

    @netomx said: Can I ask why are you using 64 bits on a 512MB VPS ?

    No PyGrub should result in more available memory. Guess I was wrong. :(

  • The kernel uses some of your RAM.

    Thanked by 1Root
  • I have an 80MB xen box and when I switch from Debian 5 to Debian 6 with pygrub (both 32 bit) the RAM dropped to 73MB. pygrub uses more memory.

  • MrAndroidMrAndroid Member
    edited February 2012

    @efball said: I have an 80MB xen box and when I switch from Debian 5 to Debian 6 with pygrub (both 32 bit) the RAM dropped to 73MB. pygrub uses more memory.

    Sometimes the RAM is reserved by certain things.

    Give the output of cat /proc/iomem

    That will tell us what's exactly using your memory.

  • nabonabo Member
    edited February 2012

    @Zero said: I get even less memory with CentOS 6 x86_64

    total used free shared buffers cached
    Mem: 489 67 422 0 1 22

    512MB = 488MiB :-)

  • @nabo said: 512MB = 488MiB. :-)

    Wouldn't 512 Megabytes be 4096 Megabits?

  • nabonabo Member
    edited February 2012

    @Daniel said: Wouldn't 512 Megabytes be 4096 Megabits?

    MB = Megabyte
    MiB = Mebibyte
    Mb = Megabit

  • netomxnetomx Moderator, Veteran

    Why binary?

  • @Daniel said: @efball said: I have an 80MB xen box and when I switch from Debian 5 to Debian 6 with pygrub (both 32 bit) the RAM dropped to 73MB. pygrub uses more memory.

    Sometimes the RAM is reserved by certain things.
    Give the output of cat /proc/iomem
    That will tell us what's exactly using your memory.

    cat /proc/iomem
    00000000-0009ffff : System RAM
    000a0000-000fffff : reserved
      000f0000-000fffff : System ROM
    00100000-04ffffff : System RAM
      01000000-012841ca : Kernel code
      012841cb-013dfeb3 : Kernel data
      01447000-0150356b : Kernel bss
    

    This is from the 80MB box that shows 73MB total with pygrub. It doesn't mean anything to me.

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    it's likely the 'video card' eating some of it.

    Francisco

    Thanked by 1TheHackBox
  • @efball it simply shows what memory address's are being used for.

  • Here's some more data. All are using Debian 6:

    32 bit, xen, pygrub, 128MB RAM, free shows 121MB = 7MB used
    64 bit, xen, pygrub, 128MB RAM, free shows 118MB = 10MB used
    32 bit, KVM, 128MB RAM, free shows 121MB = 7MB used
    
    and here's the /proc/iomem from the KVM box:
    
    cat /proc/iomem 
    00000000-0009f7ff : System RAM
    0009f800-0009ffff : reserved
    000a0000-000bffff : Video RAM area
    000c0000-000c7fff : Video ROM
    000f0000-000fffff : reserved
      000f0000-000fffff : System ROM
    00100000-07ffcfff : System RAM
      01000000-01272a56 : Kernel code
      01272a57-013be4c3 : Kernel data
      01422000-014ccd2b : Kernel bss
    07ffd000-07ffffff : reserved
    f0000000-f00000ff : 0000:00:02.0
      f0000000-f00000ff : 8139cp
    f0010000-f001ffff : 0000:00:02.0
    fec00000-fec00fff : IOAPIC 0
    fee00000-fee00fff : Local APIC
    fffbc000-ffffffff : reserved
    

    So the pygrub xen boxes aren't any worse than KVM.

  • budingyunbudingyun Member
    edited August 2012
    cat /proc/iomem
    00000000-00000fff : reserved
    00001000-0009ffff : System RAM
    000a0000-000fffff : reserved
      000f0000-000fffff : System ROM
    00100000-7fffffff : System RAM
      01000000-01508274 : Kernel code
      01508275-01c07b2f : Kernel data
      01d4e000-02012023 : Kernel bss
      05000000-0d0fffff : Crash kernel
    

    My Xen PV VPS have 2GB RAM but showing only 1.83GB RAM. What seems to be the problem? :o

  • AnthonySmithAnthonySmith Member, Host Rep

    Xen does not always report memory correctly through free -m

    Run: cat /proc/meminfo

    Near the bottom you should see: driectmap 4k, that is how much ram your VPS can actually use, if you see the wrong number in there then you have a problem but I suspect everything will be in order :)

    Thanked by 1budingyun
  • @AnthonySmith said: Run: cat /proc/meminfo

    cat /proc/meminfo
    MemTotal:        1914244 kB
    MemFree:         1491196 kB
    Buffers:            5384 kB
    Cached:           222816 kB
    SwapCached:            0 kB
    Active:           152028 kB
    Inactive:         200148 kB
    Active(anon):     123992 kB
    Inactive(anon):      320 kB
    Active(file):      28036 kB
    Inactive(file):   199828 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:       4194296 kB
    SwapFree:        4194296 kB
    Dirty:               172 kB
    Writeback:             0 kB
    AnonPages:        124008 kB
    Mapped:            16896 kB
    Shmem:               328 kB
    Slab:              30664 kB
    SReclaimable:      10540 kB
    SUnreclaim:        20124 kB
    KernelStack:        1088 kB
    PageTables:         5648 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:     5151416 kB
    Committed_AS:     764152 kB
    VmallocTotal:   34359738367 kB
    VmallocUsed:       10676 kB
    VmallocChunk:   34359705620 kB
    HardwareCorrupted:     0 kB
    AnonHugePages:         0 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    DirectMap4k:     2097152 kB
    DirectMap2M:           0 kB
    

    Thanks. :D

  • @AnthonySmith said: Run: cat /proc/meminfo

    Near the bottom you should see: driectmap 4k, that is how much ram your VPS can actually use

    On a KVM with 128mb memory:

    DirectMap4k:        8180 kB
    DirectMap2M:      122880 kB

    I added the 2 numbers up and got 127.99mb.

  • AnthonySmithAnthonySmith Member, Host Rep

    @dmmcintyre3 not sure what that means in KVM as you dont get a dedicated memory allocation, you dont need to do anything special in KVM to vastly oversell ram so I guess what I said is only applicable on XenPV.

    At a guess I would say that the total you see is what you have in use as that is all the host node needs to allocate to you at the time?

  • budingyunbudingyun Member
    edited August 2012
    dmesg | grep Memory
    Memory: 1875180k/2097152k available (5152k kernel code, 388k absent, 221584k reserved, 7166k data, 1260k init)
    

    Just wondering, it actually reserved for what?

Sign In or Register to comment.