Can I recover how much memory a instance use?

  • Автор темы Автор темы EtaLasquera
  • Дата начала Дата начала

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
527
Реакции
113
Баллы
43
We work with a lot of projects with "resstart instance" every few runs, but we need to optimize more and more. At this time we are looking on memory usage.
Command instance.MinimizeMemory() work but we need to have a litle more control.
Sometimes we loop a lot in certains web pages, and, to do login and all verifications (including hardware verifications with human fingerprints, etc), this process requires a human and in two specific portals, need a lot of time, so skip login give us at least 7 min in each restart instance.
Actualy we set to restart instance after 3000 loops, in this time, if no problems was found, the instance use 1.8GB RAM, but if problems are found like "waiting answer", that 3000 loops can use only 600MB.
After 1.4GB RAM the project run slowly.
We need to see, if current instance beat 1.4GB, restart instance, else, continue running.
Can I monitor how much memory a instance have in own use?
 
  • Спасибо
Реакции: ZX
There is an option - Max amount of memory in Instance settings.
Max amount of memory.png
If base with instances will use more then this amount, it will be set to automatic restarting.
 
I think this settings not work, my setup have default value "160" and my task ever uses more than 160MB.
I tell as instance, a browser instance.
 

Вложения

  • work.png
    work.png
    38,3 KB · Просмотры: 389
I want to resstart this instance, as you see, the maximum value in settings is 1024MB an this already reach that value.
 

Вложения

  • this.png
    this.png
    6,1 KB · Просмотры: 380
I want to resstart this instance, as you see, the maximum value in settings is 1024MB an this already reach that value.
It is restarted not exactly at 1024 Mb. It is marked to restart after reaching this max and will be restarted at suitable moment, for example, when current thread finished execution.
 
Thats the problem, I want to know how much memmory my task have in use under execution.
 
As example, I want to resstart it now!
Like I said in 1st post, I expect to have 1.6GB ram in use after 3000 loops (without need login again), today we got a lot of goodies, and in 480 loops the project beat 2.2GB.
I can retreive instance port and pid in instance window when I click in "show", there is a command to retreive instance PID from C# code?
 

Вложения

  • Sem título.png
    Sem título.png
    7,5 KB · Просмотры: 387
Bump!
I want to restart that instances who eat 5 GB / 3GB RAM.
 

Вложения

  • mem.png
    mem.png
    55,6 KB · Просмотры: 364
API does not have methods for this, as I know. You only can release instance.
https://help.zennolab.com/en/v5/zennoposter/5.30.0.0/webframe.html#topic301.html
https://help.zennolab.com/en/v5/zennoposter/5.30.0.0/webframe.html#topic743.html

Здравствуйте.

ReleaseInstance должен использоваться в связке с GetNewInstance, т.е. Вы может самостоятельно запускать инстансы, производить с ними какие-либо действия, затем освобождать их.
Для работы этих методов должен быть запущен ZennoPoster.
Обычно незачем эти методы использовать, так как ZennoPoster сам всё это делает.
ReleasePreparing соответствует названию - флаг поднимается только при освобождении инстанса.
MinimizeMemory вызывает сборщики мусора в инстансе, и инстанс освобождает память, какую может.

ZennoLab Support
Если поставить ReleasePreparing true, то в инстансе перестанут инициализироваться новые вкладки, трафик монитор будет рвать все запросы.
Если Вы собирается самостоятельно создавать инстансы, их контролировать и освобождать, то этот метод понадобиться, а так лучше его не трогать.

ZennoLab Support
 
Sure, but I don't know how much memory a instance have in use.
I need to know instance PID or enter a command to retreive memory usage before release instance.
We already use instance.minimizememory to try reduce resource usage but garbage is not our real problem.

When I select "show instance" in Zenno Poster, the Window show me Instance Port and PID.
Can I get It?
 
Try instance.FormTitle, but in some version output has been changed.
 
  • Спасибо
Реакции: EtaLasquera

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)