Powershell commands VERY slow

Slawek_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
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
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
0
Comments
-
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.0
-
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 OK0 -
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-030
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions