[GH-ISSUE #6692] [Feature request] compatibility with vm balloon ram #50722

Open
opened 2026-04-28 16:53:17 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Xyz00777 on GitHub (Sep 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6692

Originally assigned to: @dhiltgen on GitHub.

Hi, it looks like ollama is not compatibel with ballon ram inside of an VM, i wanted to run ollama inside of an balloon ram, but i realized that when i have balloon enabled ollama thinks that there is just as example 5GB Ram available out of the 15GB it could get, because they are not provisoned at the start time when ollama checks how mutch ram is available.
i think it would be aweseome to have an envionment variable to explicitly specify how mutch ram its allowed to take regardless how many there is at the time of starting.

Originally created by @Xyz00777 on GitHub (Sep 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6692 Originally assigned to: @dhiltgen on GitHub. Hi, it looks like ollama is not compatibel with ballon ram inside of an VM, i wanted to run ollama inside of an balloon ram, but i realized that when i have balloon enabled ollama thinks that there is just as example 5GB Ram available out of the 15GB it could get, because they are not provisoned at the start time when ollama checks how mutch ram is available. i think it would be aweseome to have an envionment variable to explicitly specify how mutch ram its allowed to take regardless how many there is at the time of starting.
GiteaMirror added the feature requestlinuxwindows labels 2026-04-28 16:53:53 -05:00
Author
Owner

@dhiltgen commented on GitHub (Sep 9, 2024):

We use /proc/meminfo to discover system memory information. In your environment, does anything interesting show up in the file that could help us understand what is available?

<!-- gh-comment-id:2338471706 --> @dhiltgen commented on GitHub (Sep 9, 2024): We use `/proc/meminfo` to discover system memory information. In your environment, does anything interesting show up in the file that could help us understand what is available?
Author
Owner

@Xyz00777 commented on GitHub (Sep 10, 2024):

the problem is, that proxmox is giving and taking ram when balloning is enabled dynamicly when its needed/not needed anymore, so here are 3 commands who shows memory, and dmidecode is the only one who shows the correct amount of max possible allocated memory for the vm

dmidecode --type memory 
# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x1000, DMI type 16, 23 bytes
Physical Memory Array
        Location: Other
        Use: System Memory
        Error Correction Type: Multi-bit ECC
        Maximum Capacity: 10 GB
        Error Information Handle: Not Provided
        Number Of Devices: 1

Handle 0x1100, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: Unknown
        Size: 10 GB
        Form Factor: DIMM
        Set: None
        Locator: DIMM 0
        Bank Locator: Not Specified
        Type: RAM
        Type Detail: Other
        Speed: Unknown
        Manufacturer: QEMU
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Rank: Unknown
        Configured Memory Speed: Unknown
        Minimum Voltage: Unknown
        Maximum Voltage: Unknown
        Configured Voltage: Unknown

root@ai:~# free -h
               total        used        free      shared  buff/cache   available
Mem:           7.8Gi       293Mi       7.2Gi       1.0Mi       321Mi       7.3Gi
Swap:          4.0Gi          0B       4.0Gi
root@ai:~# cat /proc/meminfo
MemTotal:        8476252 kB
MemFree:         7892224 kB
MemAvailable:    7975356 kB
Buffers:           15596 kB
Cached:           291976 kB
SwapCached:            0 kB
Active:           224260 kB
Inactive:         119484 kB
Active(anon):      46680 kB
Inactive(anon):        0 kB
Active(file):     177580 kB
Inactive(file):   119484 kB
Unevictable:       27652 kB
Mlocked:           27652 kB
SwapTotal:       4194300 kB
SwapFree:        4194300 kB
....
<!-- gh-comment-id:2342057630 --> @Xyz00777 commented on GitHub (Sep 10, 2024): the problem is, that proxmox is giving and taking ram when balloning is enabled dynamicly when its needed/not needed anymore, so here are 3 commands who shows memory, and dmidecode is the only one who shows the correct amount of max possible allocated memory for the vm ``` dmidecode --type memory # dmidecode 3.3 Getting SMBIOS data from sysfs. SMBIOS 2.8 present. Handle 0x1000, DMI type 16, 23 bytes Physical Memory Array Location: Other Use: System Memory Error Correction Type: Multi-bit ECC Maximum Capacity: 10 GB Error Information Handle: Not Provided Number Of Devices: 1 Handle 0x1100, DMI type 17, 40 bytes Memory Device Array Handle: 0x1000 Error Information Handle: Not Provided Total Width: Unknown Data Width: Unknown Size: 10 GB Form Factor: DIMM Set: None Locator: DIMM 0 Bank Locator: Not Specified Type: RAM Type Detail: Other Speed: Unknown Manufacturer: QEMU Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Rank: Unknown Configured Memory Speed: Unknown Minimum Voltage: Unknown Maximum Voltage: Unknown Configured Voltage: Unknown root@ai:~# free -h total used free shared buff/cache available Mem: 7.8Gi 293Mi 7.2Gi 1.0Mi 321Mi 7.3Gi Swap: 4.0Gi 0B 4.0Gi root@ai:~# cat /proc/meminfo MemTotal: 8476252 kB MemFree: 7892224 kB MemAvailable: 7975356 kB Buffers: 15596 kB Cached: 291976 kB SwapCached: 0 kB Active: 224260 kB Inactive: 119484 kB Active(anon): 46680 kB Inactive(anon): 0 kB Active(file): 177580 kB Inactive(file): 119484 kB Unevictable: 27652 kB Mlocked: 27652 kB SwapTotal: 4194300 kB SwapFree: 4194300 kB .... ```
Author
Owner

@dhiltgen commented on GitHub (Sep 17, 2024):

I just noticed HyperV's balloon driver has similar behavior, so this applies to both Linux and Windows. We may see a much smaller amount of memory available and fail to load models that could load once the hypervisor makes more dynamic RAM available to the VM.

<!-- gh-comment-id:2356615751 --> @dhiltgen commented on GitHub (Sep 17, 2024): I just noticed HyperV's balloon driver has similar behavior, so this applies to both Linux and Windows. We may see a much smaller amount of memory available and fail to load models that could load once the hypervisor makes more dynamic RAM available to the VM.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#50722