Howdy, Stranger!

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


First lowendbox at EDIS RO - out of memory - 256 MB vserver ubuntu 12.04 lts 64-bit
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.

First lowendbox at EDIS RO - out of memory - 256 MB vserver ubuntu 12.04 lts 64-bit

cheapdavecheapdave Member
edited July 2013 in Help

From the default image, when I try to install aptitude:

root@vps:~# apt-get install aptitude
...
dpkg: unrecoverable fatal error, aborting:
 fork failed: Cannot allocate memory
E: Sub-process /usr/bin/dpkg returned an error code (2)
...

Googling tells me that I have less memory than min required.
So I try to see if I have swap space:

root@vps:~# swapon -s
Filename                Type        Size    Used    Priority
/dev/sda4                               partition   46874992    0   -1

AFAIK this means that there is a shared swap area for all users of this physical server - and it is around 44GB. Is that right? Or do I need to make a local swap partition using something like this:
https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04

EDIT:
I added the updates repo to /etc/apt/sources.list , then ran an apt-get update and then tried the above.

root@vps:~# cat /etc/apt/sources.list
deb http://at.archive.ubuntu.com/ubuntu precise main
deb http://at.archive.ubuntu.com/ubuntu precise-updates main

Thanks in advance,
-cheapdave

Comments

  • JanevskiJanevski Member
    edited July 2013

    @cheapdave Install Debian minimal, then put what You really need.

    Thanked by 1cheapdave
  • rm_rm_ IPv6 Advocate, Veteran
    edited July 2013

    Have to say VServer of all things is a tremendously crappy choice as the "First lowendbox". I'm sure even people from EDIS won't argue much that this technology... let's say, has it's share of limitations.

  • perennateperennate Member, Host Rep

    See http://www.lowendtalk.com/discussion/comment/295867/#Comment_295867

    Also if you email [email protected] maybe they'll let you temporarily have more RAM to setup things.

    Thanked by 1cheapdave
  • AdducAdduc Member

    You may want to reinstall using a 32-bit distribution, it should reduce memory usage enough to be able to comfortably use apt.

  • cheapdavecheapdave Member
    edited July 2013

    Thanks for the quick replies, folks.

    @perennate

    What I am not clear about is whether the output of swapon -s is correct in indicating 44GB of swap ?
    Assuming it is an active swap partition, can i add a second swap partition of my own of 256 MB so that I get a total of 512MB of RAM.
    Would that work?

    @Adduc

    You may want to reinstall using a 32-bit distribution, it should reduce memory usage enough to be able to comfortably use apt.

    Since this is a VPS I have taken to learn server admin, I was to try all images eventually, but it seems I will have to start with the 32-bit versions.
    Btw, can anyone else confirm that this is the problem - I wonder because this would mean that offering 64-bit images for 128 and 256 MB RAM plans would be redundant / wasteful, and the folks at EDIS would have thought about that, no?

    @Janevski said:

    cheapdave Install Debian minimal, then put what You really need.

    Can i use apt-get etc or would it it be better to try dpkg alone, given that apt-get and aptitude both didn't work.

    Thanks again,
    cheers,
    cheapdave

  • JanevskiJanevski Member
    edited July 2013

    @cheapdave If it's an OpenVZ environment i believe there is already available Debian minimal install image. Just install that from Your VPS control panel, then run:

    apt-get update
    apt-get install INSERT ALL PACKAGE NAMES YOU NEED HERE IN LOWERCASE SEQUENTIALLY DIVIDED BY SPACE -y
    

    Done.

    apt-get and openssh usually come with Debian minimal, aptitude not, however You can install it:

    apt-get update
    apt-get install aptitude -y
    

    If it's other kind of virtualization at Debian OS installation just install openssh, so You can ssh into the box easily.

    Don't use dpkg if You really don't have to, it's time consuming, and You might end up with broken dependencies.

    Thanked by 1cheapdave
  • DomainBopDomainBop Member
    edited July 2013

    If it's an OpenVZ environment i believe there is already available Debian minimal install image. Just install that from Your VPS control panel, then run:

    It's not OpenVZ. It's Linux Vserver.

    What I am not clear about is whether the output of swapon -s is correct in indicating 44GB of swap ?

    Assuming it is an active swap partition, can i add a second swap partition of my own of 256 MB so that I get a total of 512MB of RAM.
    Would that work?

    Vserver works in strange ways (example 1, Top shows the server load for the entire node not just your VPS; example2 all VPS's have full access to all cores/threads on the node, there is no throttling or limiting a VPS to 1 or 2 cores)

    The swapon -s 44GB is the entire node. Use free -m to see if your VPS has any swap.

    http://wiki.linux-vserver.org/Memory_Limits
    http://wiki.linux-vserver.org/Memory_Management

    Have to say VServer of all things is a tremendously crappy choice as the "First lowendbox".

    Vserver pros (the only one if you ask me): you get full access to the processor so you can have a 256MB VPS with a Unixbench score of 6000

    VServer cons: many with poor memory management (i.e. frequent out of memory problems and processes dieing as a result) being the one that caused me to stop using it.

    Thanked by 1cheapdave
  • MaouniqueMaounique Host Rep, Veteran

    Agree, what i can do in 128 MB OVZ cant in same amount on vServer, i had random mysql crashes due to out of memory issues while on OVZ works flawlessly with ram to spare.

    vServer is not suitable for very small VMs, I think, however, I did use it successfully at home some many years ago to provide some kind of enhanced shells to some friends which were learning linux.

    Thanked by 1cheapdave
  • skaska Member

    VServer is nice to securely separate processes on one system. It is nice if you are the "owner" of the system. Other than that, since we have Openvz/Xen/KVM there is no real need anymore to use VServer as a client to have a "half"-VPS.

    Thanked by 1cheapdave
  • cheapdavecheapdave Member
    edited August 2013

    Hi,

    @DomainBop said:
    The swapon -s 44GB is the entire node. Use free -m to see if your VPS has any swap.

    @DomainBop, among the other details, this one really answered my question - I had no swap. So I'll try with swap now.

    @Maounique said:
    Agree, what i can do in 128 MB OVZ cant in same amount on vServer, i had random mysql crashes due to out of memory issues while on OVZ works flawlessly with ram to spare.

    vServer is not suitable for very small VMs, I think, however, I did use it successfully at home some many years ago to provide some kind of enhanced shells to some friends which were learning linux.

    Next month I'm switching to OpenVZ !

    @Janevski thanks for the debian inputs. It's next on my list after ubuntu - I'm trying ubuntu mainly because many cloud providers provide default ubuntu images, and many horizontal scaling solutions are scripted for ubuntu, from my research and limited knowledge (I'm no shell script guru).

    Thanks to everyone for the quick replies!
    cheers
    cheapdave

    EDIT:
    Well I guess vserver really has a lot of issues:

    dd if=/dev/zero of=/swapfile bs=1024 count=256k
    mkswap /swapfile 
    swapon /swapfile 
    swapon: /swapfile: swapon failed: Operation not permitted
    

    So I cannot get the system swap as free -m shows 0 and i cannot make my own swap file. This probably means I have to try with 32-bit debian minimal and nothing else. This is quite strange, given that this issue will be faced by literally everyone using any other distro on the EDIS.AT vServer plans. How I wish there was an EDIS.AT forum ...

    I guess I will have to raise a support ticket.

  • MaouniqueMaounique Host Rep, Veteran

    You cannot use or set swap from inside container. That is available only on the node and to admins.
    If you need to be able to set the swap partition, you need a KVM.

  • JanevskiJanevski Member
    edited August 2013

    @cheapdave said:
    @Janevski thanks for the debian inputs. It's next on my list after ubuntu - I'm trying ubuntu mainly because many cloud providers provide default ubuntu images, and many horizontal scaling solutions are scripted for ubuntu, from my research and limited knowledge (I'm no shell script guru).

    Ubuntu is forked from Debian.

    Ubuntu is Debian, just more buffed up, in looks mostly, and some other stuff.

    See GNU/Linux distribution tree here.

Sign In or Register to comment.