LXC loadavg

Discussion in 'Proxmox VE: Installation and configuration' started by janos, Jun 11, 2018.

Tags:
  1. janos

    janos Member

    Joined:
    Aug 24, 2017
    Messages:
    148
    Likes Received:
    13
    Hi,

    18 days ago, loadavg code merged into LXC, as an opt-in features: https://github.com/lxc/lxcfs/pull/237

    I would like to ask, when these feature will be available in LXC on Proxmox?
     
    harvie likes this.
  2. harvie

    harvie Member

    Joined:
    Apr 5, 2017
    Messages:
    83
    Likes Received:
    12
  3. sahostking

    sahostking Member

    Joined:
    Oct 6, 2015
    Messages:
    323
    Likes Received:
    8
    Same thing here :) We also use nagios and this is a big problem. Cant wait either
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. mac.linux.free

    Joined:
    Jan 29, 2017
    Messages:
    99
    Likes Received:
    5
    We are using check_mk .. same problem please integrate.
     
  5. Daniel Hrabarchuk

    Daniel Hrabarchuk New Member

    Joined:
    Jan 23, 2019
    Messages:
    1
    Likes Received:
    0
    Is there any word on when this will be implemented?
     
  6. mailinglists

    mailinglists Active Member

    Joined:
    Mar 14, 2012
    Messages:
    387
    Likes Received:
    34
    Everyone wants that, including me. :)
    For you waiting for it, maybe look for existing feature requests and open one, if it's not there already?
    https://bugzilla.proxmox.com/
     
  7. harvie

    harvie Member

    Joined:
    Apr 5, 2017
    Messages:
    83
    Likes Received:
    12
  8. mailinglists

    mailinglists Active Member

    Joined:
    Mar 14, 2012
    Messages:
    387
    Likes Received:
    34
    By the looks of things in mailing list it seems like this patch was included today.
     
  9. oguz

    oguz Proxmox Staff Member
    Staff Member

    Joined:
    Nov 19, 2018
    Messages:
    591
    Likes Received:
    62
    There's a patch available on the mailing list, which should get packaged soon. This behaviour still can't be changed during runtime yet, I will see about making a pull request upstream to make it possible. In the meantime, it is possible to change the systemd service file to include the -l flag, restart all containers and lxcfs service to get it functioning.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. harvie

    harvie Member

    Joined:
    Apr 5, 2017
    Messages:
    83
    Likes Received:
    12
    So this will be turned off by default? I think it would make sense to enable it by default in proxmox use case.
     
  11. oguz

    oguz Proxmox Staff Member
    Staff Member

    Joined:
    Nov 19, 2018
    Messages:
    591
    Likes Received:
    62
    The upstream version is an opt-in now, probably because it's a new feature.

    We will have to decide how to implement this in Proxmox.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. harvie

    harvie Member

    Joined:
    Apr 5, 2017
    Messages:
    83
    Likes Received:
    12
    Is there reason for not enabling this by default in proxmox? I understand that some LXC users do not use LXC as VPS (eg. docker,...), but since proxmox is container based VPS implementation it makes sense to have as much isolation as possible.
     
  13. oguz

    oguz Proxmox Staff Member
    Staff Member

    Joined:
    Nov 19, 2018
    Messages:
    591
    Likes Received:
    62
    This feature doesn't add to the isolation at all. `sysinfo()` will return the host information even when in a container.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. harvie

    harvie Member

    Joined:
    Apr 5, 2017
    Messages:
    83
    Likes Received:
    12
    masking loadavg is not really about security... at least in my case. it's more about creating best possible illusion of separate server.
     
  15. oguz

    oguz Proxmox Staff Member
    Staff Member

    Joined:
    Nov 19, 2018
    Messages:
    591
    Likes Received:
    62
    This is now resolved. Whether to enable it default or not, will be decided later.

    Willing users can enable this behaviour by editing:

    Code:
    /lib/systemd/system/lxcfs.service
    
    and by adding the `-l` flag in ExecStart. Then restart service and containers.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. harvie

    harvie Member

    Joined:
    Apr 5, 2017
    Messages:
    83
    Likes Received:
    12
    I've just upgraded and in man lxcfs i don't see the -l flag. I guess it's still in pvetest repository and waiting to get to stable repos? I don't really know how proxmox releases are done...
     
  17. oguz

    oguz Proxmox Staff Member
    Staff Member

    Joined:
    Nov 19, 2018
    Messages:
    591
    Likes Received:
    62
    It is in pve-no-subscription

    If you are using enterprise repository, it's not there yet.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. harvie

    harvie Member

    Joined:
    Apr 5, 2017
    Messages:
    83
    Likes Received:
    12
    Yes. Now it showed up. I think it was cached somewhere... When i've been trying few hours ago i did apt update and dist-upgrade and it didn't updated lxcfs... Now it did. Thanks for support. I will try it now.
     
  19. harvie

    harvie Member

    Joined:
    Apr 5, 2017
    Messages:
    83
    Likes Received:
    12
    I tested and it seems to work as expected! At least in w, htop and nagios nrpe check_load it reports proper values. Thats great!

    Now i wonder if there's proper way for the -l parameter to survive upgrade of lxcfs package...

    update: it can be done using systemd overrides:

    execute systemctl edit lxcfs

    type following and save the file:

    [Service]
    ExecStart=
    ExecStart=/usr/bin/lxcfs -l /var/lib/lxcfs/

    this will get automaticaly saved to /etc/systemd/system/lxcfs.service.d/override.conf file
    note that the ExecStart= line deletes original definition, otherwise there would be two ExecStart statements after override is applied
    to revert to default execute systemctl revert lxcfs
     
    #19 harvie, Feb 13, 2019
    Last edited: Feb 13, 2019
  20. sahostking

    sahostking Member

    Joined:
    Oct 6, 2015
    Messages:
    323
    Likes Received:
    8
    Finally I can move back to proxmox from solusvm :) LXC was hell without loadavg not working but finally it is.

    I just tested this out on a test server using cpanel test box and using "stress" - https://www.tecmint.com/linux-cpu-load-stress-test-with-stress-ng-tool/

    and it works perfectly :)

    Thank you thank you thank you
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice