Coder Social home page Coder Social logo

Comments (5)

kroese avatar kroese commented on August 26, 2024 1

Thanks, the funny thing is I already used that article to optimize the container. All Hyper-V enlightments are already enabled. That causes problems on some machines, but you can disable enlightments by setting HV: "N" in the compose file.

The only thing I did not add is hugepages support, because I read very conflicting opinions on wether it was a good idea or not. It seems to be very dependant on the actual machine if enabling it makes it faster or slower. So to be on the safe side, I did not implement that feature yet.

from windows.

kroese avatar kroese commented on August 26, 2024 1

There already exists an environment variable to add extra QEMU parameters, so you can already use hugepages with something like:

  ARGUMENTS: "-mem-prealloc -mem-path /storage/hugepages/"

So adding an environment variable especially for hugepages would not change much, except that it could look like:

  HUGEPAGES: "/storage/hugepages/"

Which is only slightly shorter.

from windows.

dannykorpan avatar dannykorpan commented on August 26, 2024

Is it possible to add a docker environment variable and set the default to "no"?

from windows.

dannykorpan avatar dannykorpan commented on August 26, 2024

I've tried it, with

ARGUMENTS: "-mem-prealloc -mem-path /storage/hugepages/"

But get this error in docker.

windows  | ❯ ERROR: qemu-system-x86_64: can't open backing store /storage/hugepages/ for guest RAM: Is a directory

My complete docker-compose.yml looks like this

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    environment:
      VERSION: "ltsc10"
      RAM_SIZE: "12G"
      CPU_CORES: "6"
      DISK_SIZE: "256G"
      ARGUMENTS: "-mem-prealloc -mem-path /storage/hugepages/"
    volumes:
      - ./disks:/storage

from windows.

kroese avatar kroese commented on August 26, 2024

It expects it to be a file, and not a directory. So maybe create an empty file of 32 GB for example (by using the linux fallocate command) and then call it hugepages and remove the last slash so it reads -mem-path /storage/hugepages.

But I never worked with hugepages so I am also just guessing.

from windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.