clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

live-desktop doesn't launch with <= 1GB RAM #864

Open puneetse opened 5 years ago

puneetse commented 5 years ago

On VirtualBox and VMware if the default assigned RAM for a newly created VM is < 1GB (default value in some cases), the live-desktop doesn't show a desktop unless a VM is assigned 1GB for RAM or more. A mysterious black screen with only a mouse cursor is shown.

If this the new minimum requirement for the live-desktop, can it be added as a check before attempting to start GDM to show users an error?

@bwarden @mdhorn

fenrus75 commented 5 years ago

we need to go on a diet

On Fri, Jun 7, 2019, 06:01 puneetse notifications@github.com wrote:

On VirtualBox and VMware if the default assigned RAM for a newly created VM is < 1GB (default value in some cases), the live-desktop doesn't show a desktop unless a VM is assigned 1GB for RAM or more. A mysterious black screen with only a mouse cursor is shown.

If this the new minimum requirement for the live-desktop, can it be added as a check before attempting to start GDM to show users an error?

@bwarden https://github.com/bwarden @mdhorn https://github.com/mdhorn

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/864?email_source=notifications&email_token=AAJ54FIZ3W6B7DTOWPQWFBDPZJL4NA5CNFSM4HVW3WY2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GYH4VDA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ54FI2AIY4E565TYGKQHDPZJL4NANCNFSM4HVW3WYQ .

mdhorn commented 5 years ago

The recommended requirements are 4GB of RAM https://clearlinux.org/documentation/clear-linux/reference/system-requirements#system-requirements

I'm pretty sure the desktop ISO needs at least 4GB to work correctly due to squashfs and ...? @evil-brain

If we did add a minimum memory check for desktop, should we have that in the desktop autostart service?

evil-brain commented 5 years ago

I did some quick testing on VirtualBox - it appears the minimum for desktop is about 1536MB of RAM. Less than that (I tried 1290MB) fails to boot.

The non-desktop server version boots on 768MB.

The root-level RAMFS is locked at 512MB, and tmpfs will by default use 1/2 of RAM - but only when data is written to it - so minimum RAM depends somewhat on how many files are in /tmp.

So we can infer that the minimum ram is at least (512MB + process use + tmpfs use + kernel use)

After booting to desktop, 'free' shows we're using 575MB of RAM - of which 'df' suggests 31MB are files on rootfs and 0MB are tmpfs.

This suggests the system should be able to boot on 768MB, but testing shows it cannot. I think RAM usage must be higher during desktop initialization.

If we make the RAMFS smaller, then we have problems running applications that write to disk (our custom Firefox launcher/installer uses ~200MB disk space on start alone)

I'm open to ideas on slimming down the requirements

FWIW, Ubuntu's minimum RAM requirement is 2GB, but Fedora's is 1GB. I wonder if that's for a full DE or just something like XFCE+X11... also the requirements for the live system are greater than the requirements for an installed system (due to RAMFS).

This may be a use case for the .img over the ISO, the .img doesn't need RAMFS and so can run with less RAM required.

EDIT: The VirtualBox Clear Linux documentation (link) states to use 1024MB, so this should be updated. I think a more in-depth analysis may be needed, RAM usage on Linux is very complicated.

mvincerx commented 5 years ago

EDIT: The VirtualBox Clear Linux documentation (link) states to use 1024MB, so this should be updated. I think a more in-depth analysis may be needed, RAM usage on Linux is very complicated.

@evil-brain, In short, the link you provided above is to a stale node that erroneously builds because the Drupal implementation, and its build environment, do not properly flush old nodes. You can view the virtual-machine section of our documents, where you will NOT find virutalbox.rst file. That file was deleted over 28 days ago from the CL Docs.

I filed a ticket requesting that the Web team solve this asap. This problem has been occurring for a long time. I added you as a Watcher so you can view progress.

The officially published version of VirtualBox for CL specifies only using live-desktop, and recommends a VM with 2048 MB at minimum.

puneetse commented 4 years ago

The documentation for this has since been updated to reflect the current 1GB+ requirement for live-desktop: https://docs.01.org/clearlinux/latest/reference/system-requirements.html

I'm leaving this open to address the behavior when there is not enough RAM and/or revisit the minimum requirement.