VirtalBox и RAM

Виртуальные машины и среды исполнения

Модератор: Olej

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

VirtalBox и RAM

Непрочитанное сообщение Olej » 09 сен 2015, 12:14

Есть такое мнение, что
Если Virtualbox не хватает оперативы, то он может сам приостанавливать виртуалку
И вот ещё ... 4 года назад:
да вот одна небольшая проблема. VirtualBox не хочет использовать swap, а 1 Гб физической памяти - не так уж и много, быстро забивается (swap'а 3 Гб). И хуже всего то, что VirtualBox при недостатке физической памяти просто останавливает виртуальную машину, что очень неудобно, когда такое происходит часто.
Но никаких других подтверждений, кроме форума LFR, я не нахожу ... тому, что VirtualBox ведёт себя именно так.
А LFR я не могу сильно доверять, потому как квалификация там ... "ещё та" ;-) ... разве что LOR-у в этом смысле уступает первенство. :lol:

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: VirtalBox и RAM

Непрочитанное сообщение Olej » 09 сен 2015, 12:26

Olej писал(а):Есть такое мнение, что
Если Virtualbox не хватает оперативы, то он может сам приостанавливать виртуалку
Но это похоже на правду...
По крайней мере у меня при очень больших (Chromium - сборка и модификация) компиляциях (и даже уже линковке) виртуальная машина (отмеченная как "Запущена") не реагирует на действия, не переключаются рабочие столы, закладки терминала, ввод с терминала не работает...

VM - Ubuntu 14.04.
В окне GUI менеджере VirtualBox при наведении на эту работающую (?) VM курсора всплывает текст сообщения "сеанс заблокирован".

В логах VirtualBox при этом последние сообщения выглядят так:

Код: Выделить всё

50:57:54.476907 VBVA: InfoScreen: [0] @0,0 1440x900, line 0x1680, BPP 32, flags 0x1
51:00:16.352655 TM: Giving up catch-up attempt at a 60 000 480 555 ns lag; new total: 15 781 925 458 037 ns
51:04:41.342366 VMMDev: HeartBeatCheckTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago
51:59:22.433069 PulseAudio: Audio input/output stopped!
Нужно срочно найти в документации или других источниках (не в форумной болтовне) что означает это "сеанс заблокирован"?

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: VirtalBox и RAM

Непрочитанное сообщение Olej » 09 сен 2015, 12:44

Olej писал(а): По крайней мере у меня при очень больших (Chromium - сборка и модификация) компиляциях (и даже уже линковке) виртуальная машина (отмеченная как "Запущена") не реагирует на действия, не переключаются рабочие столы, закладки терминала, ввод с терминала не работает...

VM - Ubuntu 14.04.
В окне GUI менеджере VirtualBox при наведении на эту работающую (?) VM курсора всплывает текст сообщения "сеанс заблокирован".
Попробую поймать ситуацию...
Отдаю VM 2Gb RAM.
Запускаю сборку (но это последняя фаза - линковка) сборки Chromium...

Наблюдаю картину системного монитора MATE в VM на начале процесса...
ch1.png
Дальше всё заканчивается ... "как всегда"(с) :lol: - загрузка RAM линейно возрастает, доходит до 2 Gb, начинает увеличиваться (!!!) использование свопа ... и заканчивается всё "сеанс блокирован" :-o

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: VirtalBox и RAM

Непрочитанное сообщение Olej » 10 сен 2015, 14:33

Вот, попутно, любопытные места из свежей документации.
Не знаю, имеет это какое-то касательство или нет к моей проблеме...
4.9.1 Memory ballooning
Starting with version 3.2, the Guest Additions of VirtualBox can change the amount of host memory that a VM uses while the machine is running. Because of how this is implemented, this feature is called “memory ballooning”.
Note: VirtualBox supports memory ballooning only on 64-bit hosts, and it is not supported on Mac OS X hosts.
When memory ballooning is requested, the VirtualBox Guest Additions (which run inside the guest) allocate physical memory from the guest operating system on the kernel level and lock this memory down in the guest. This ensures that the guest will not use that memory any longer: no guest applications can allocate it, and the guest kernel will not use it either. VirtualBox can then re-use this memory and give it to another virtual machine.
The memory made available through the ballooning mechanism is only available for re-use by VirtualBox. It is not returned as free memory to the host. Requesting balloon memory from a running guest will therefore not increase the amount of free, unallocated memory on the host.
Effectively, memory ballooning is therefore a memory overcommitment mechanism for multiple virtual machines while they are running. This can be useful to temporarily start another machine, or in more complicated environments, for sophisticated memory management of many virtual machines that may be running in parallel depending on how memory is used by the guests.
At this time, memory ballooning is only supported through VBoxManage. Use the following command to increase or decrease the size of the memory balloon within a running virtual machine that has Guest Additions installed:

Код: Выделить всё

VBoxManage controlvm "VM name" guestmemoryballoon <n>
where "VM name" is the name or UUID of the virtual machine in question and <n> is the amount of memory to allocate from the guest in megabytes.
...
You can also set a default balloon that will automatically be requested from the VM every time after it has started up with the following command:

Код: Выделить всё

VBoxManage modifyvm "VM name" --guestmemoryballoon <n>
By default, no balloon memory is allocated. This is a VM setting, like other modifyvm settings, and therefore can only be set while the machine is shut down;
http://download.virtualbox.org/virtualb ... ction.9.30
VirtualBox ships a simple heartbeat service. Once the Guest Additions are active, the guest sends frequent heartbeat pings to the host. If the guest stops sending the heartbeat pings without properly termination the service, the VM process will log this event in the VBox.log file. In the future it might be possible to configure dedicated actions but for there is only a warning in the log file.
...
If the heartbeat timeout expires, there will be a log message like

Код: Выделить всё

VMMDev:  HeartBeatCheck-Timer: Guest seems to be unresponsive. Last heartbeat received 5 seconds ago.
If another heartbeat ping arrives after this warning, there will be a log message like

Код: Выделить всё

VMMDev: GuestHeartBeat: Guest is alive.

Ответить

Вернуться в «Виртуализация»

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 9 гостей