Powershell commands VERY slow

Slawek_GuzekSlawek_Guzek Member Posts: 1,690
Hi All,

I am having intermittent problems with managing my DEV server. The Powershell commands like Get-NavServerInstance / New-NavServerInstance become VERY slow. Normally they are instant, but after server is up and running for some time they slowing down to the point where Get-NavServerInstance can take 20-30 minutes to return results.

The server is virtual machine with 3 vCPUs configured and 16 GB of RAM. It hosts SQL 2012, 10 NST services configured, and a mixture of 2009/2016/2017 databases. Max SQL memory is limited to 5GB leaving plenty memory for NSTs - anyway only one NST is running at the moment.

The server OS is Windows 2008 R2 Std +SP1. The CPU utilization oscillates below 10%, there is about 4.2 GB of memory available, minimal or no IO or network traffic. SQL is fully responsible, NST is also works normally - it is just NAV Powershell commands that are apparently doing something or waiting for something behind the scenes.

I have 2016 and 2017 installed on the server and both are affected - no matter if I use 2016 or 2017 Administration Console or shell it becomes very unresponsive after some time.

Last command New-NAVServerInstance (run from 2017 Administration) took about 23 minutes to complete. I was watching CPU/Memory utilization - just 2% on average with short spikes up to 30% every 30 secs or so. Available RAM dropped from 4.2 to 3.8GB during that time. Madness.

Restarting the virtual box helps - until the next time.

What could be the reason? Where to look at ? What to search for?

Regards,
Slawek



Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03

Comments

  • rosietesmenrosietesmen Member Posts: 6
    its slow for me too and my profile is on direct drive access. also it is read once, cached by OS and closed after startup so network or not it should affect nothing. this is just MS poor attempt at redoing the wheel, but square, yet again.
  • KishormKishorm Member Posts: 921
    This might sound like a mad idea but try it next time it's going slow. I had speed issues very early on when MS introduced the powershell commands for NAV and after lots of frustration and trial and error I discovered the following solution. It may not work for you (I haven't had problems for a while, but I'm working on a different machine now) but definitely worth a try...

    1) Run Task Manager
    2) Select the "Details" tab
    3) Find the entry for "Powershell.exe" or "Powershell_ise.exe" - depending on what you are using
    4) Right Click and select "Set Affinity"
    5) Untick all CPUs except for "CPU 0"
    6) Click on OK
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Thanks Kishorm. I will certainly try it when it happens next time.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Sign In or Register to comment.