Developer forum

Forum » Ecommerce - Standard features » Index building governor

Index building governor

Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hello,

We have a site with 133,000 products. Building the index brings the CPU on the server to nearly 100% and holds it for nearly 5 minutes. We will be making an improvement to exlude unnecessary products (about 90% of them). So that should help considerably.

Edit: Note that we have a customization to store stock per week per product, for a year. So that's why this takes longer than a typical site to build 133K products.

However, even if the server hits high CPU for 1 minute, that's still enough to impact users to the website. Is there a way that we can tap into the index to add a governor of some sort to slow it down and keep CPU lower? I don't mind if if takes twice as long to build, just as long as we can keep the CPU lower, to give plenty of breathing room to site traffic. 

Currently we run the index every 2 hours. 

I guess another option is to create a 2nd instance of the website, set up the load balancer module, have only the 2nd instance do the running of the index, and use IIS throttling on the 2nd instance to keep the CPU down. But that's a lot of work to create a solution for this.

You've recently added the ability to add a 1ms delay when sending emails in the email marketing module, and that seems to work well. 10,000 records would take an extra 10 minutes with a 1ms delay, which would be acceptable if it evens out the CPU. 

Any suggestions on the best way to throttle the CPU while building the index? 

Thanks,

Scott


Replies

 
Nicolai Pedersen
Reply

Hi Scott

I am not sure thread.sleep would even work.

I have been wondering if setting thread priority is a better solution or, if possible, use WaitOne on an eventhanlde in system.threading. 100% cpu is not bad as long as other processes have first priority...

But it is way out of my league here... I will discuss with devs.

BR Nicolai

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Thanks Nicolai.

Good point. Using thread priority does sound like possibly the ideal solution. That will give the fastest build time without impacting the performance of the site. It will get the most out of the server. 

Thanks!

Scott

 

You must be logged in to post in the forum