Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Modifying values in EWS server low performance

SmartConnector Forum

Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure Building
  • SmartConnector
  • SmartConnector Forum
  • Modifying values in EWS server low performance
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
JeffBowman
Sisko JeffBowman Sisko
164
ardak
ardak Schneider Alumni (Retired)
34
sesa180908_brid
Commander sesa180908_brid Commander
34
mike_meirovitz
Commander mike_meirovitz
21
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to SmartConnector Forum
Solved
Lihov
Lieutenant | EcoXpert Master Lihov Lieutenant | EcoXpert Master
Lieutenant | EcoXpert Master

Posted: ‎2017-07-18 11:37 PM

1 Like
3
879
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-07-18 11:37 PM

Modifying values in EWS server low performance


Hello!

My SmartConnector Extension get data from 600 electrical counters. Part of reading data from devices works fine, but updating EwsValueItems in EWS server performs very slow with high CPU usage. The number of measured parametrs is about 2500. Update rate - 30s. So, when I invoke DataAdapter.ModifyValueItemValue for each item in loop for upadting items vlaue, the CPU usage is increases up to 30-40% by Mogoose.Service. The duration measurement in log file present.

UpdateEwsValues.jpg

In Log.txt ForEach duration means execution time of bottom red rectangle (ms). Join Duration - top rectangle (ms). Therefore, ModifyValueItemValue operates slowly - but what a reason?

What is a best approach for updating Ews Items Values with high Update Rate?

Attachments
Log.txt.zip
Reply
  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
sesa180908_brid
Commander sesa180908_brid Commander
Commander

Posted: ‎2017-07-19 07:06 AM

1 Like
0
807
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-07-19 07:06 AM

If you have long running "tight" loops in a Processor you are required to monitor the CancellationToken.  Section "5.5.3.6.2 Looping" in the SmartConnector Developers Guide talks about this a bit.  This is important if you want to have control over your running processes.

Also when you have tight/long running loops (for, for each, while etc) it is best to allow other threads to have priority.  This can easily be done by calling Thread.Sleep for a short time frame (on the order of a few mSec). 

The Processor base class will do both of these for you in the "NoBusyWait" call.  I will typically put a NoBusyWait(5) call at the bottom of most arbitrarily long loops.  My guess will be that this will lessen the CPU spikes you see in your looping.

As for general performance of the EwsServerDataAdapter.  It is a known issue that writes to the underlying database (Add and Modify methods) are slow when used in "chatty" use cases like this one.  We are currently working on an enhancement (in the 2.3 release) which will provide a way to delay the actual commit to the database.  Preliminary testing does show some considerable improvements in performance.

See Answer In Context

Reply
Replies 3
sesa180908_brid
Commander sesa180908_brid Commander
Commander

Posted: ‎2017-07-19 07:06 AM

1 Like
0
808
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-07-19 07:06 AM

If you have long running "tight" loops in a Processor you are required to monitor the CancellationToken.  Section "5.5.3.6.2 Looping" in the SmartConnector Developers Guide talks about this a bit.  This is important if you want to have control over your running processes.

Also when you have tight/long running loops (for, for each, while etc) it is best to allow other threads to have priority.  This can easily be done by calling Thread.Sleep for a short time frame (on the order of a few mSec). 

The Processor base class will do both of these for you in the "NoBusyWait" call.  I will typically put a NoBusyWait(5) call at the bottom of most arbitrarily long loops.  My guess will be that this will lessen the CPU spikes you see in your looping.

As for general performance of the EwsServerDataAdapter.  It is a known issue that writes to the underlying database (Add and Modify methods) are slow when used in "chatty" use cases like this one.  We are currently working on an enhancement (in the 2.3 release) which will provide a way to delay the actual commit to the database.  Preliminary testing does show some considerable improvements in performance.

Reply
Lihov
Lieutenant | EcoXpert Master Lihov Lieutenant | EcoXpert Master
Lieutenant | EcoXpert Master

Posted: ‎2017-07-26 02:21 AM

1 Like
1
806
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-07-26 02:21 AM

Thak you, Mark, for the response. I know about monitoring of CancellationToken - it was added to final version of method.

I achived a reduction of processor load to 5-10% by NoBusyWait calling, but summary duration of method greatly increased.

When is the release of version 2.3 planned?

Reply
sesa180908_brid
Commander sesa180908_brid Commander
Commander

Posted: ‎2017-07-26 05:44 AM

1 Like
0
807
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-07-26 05:44 AM

We don't have a definitive date for the 2.3 release.  It should be sometime in early Q4 though.

Reply
Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of