Discussion:
[selenium-users] Slow chrome launch/navigation and high cpu usage when trying to launch multiple instances parallely
Nish26
2015-09-09 11:08:37 UTC
Permalink
Hi All,

When trying to run chrome driver , while i am able to launch multiple
copies of chrome almost instantly , total time from launch to navigate
action takes a long time which is directly related to number of instance i
have launched in parallel.
I need to run my test cases on multiple instance of chrome at the same
time[10-15 instances or even more]. While Slow chrome launch/navigation is
unacceptable , high CPU usage by chrome does not allow me to continue
smoothly with my test cases. Any help in these two areas would be
appreciated.

*Observations:*
Single instance launch + Navigate : 3993 ms
Two instances launch + Navigate : 6102 ms
Three instances launch + Navigate : 14685 ms
Four instances launch + Navigate : 16125 ms
and so on. Also , CPU usage increased to 100%[usage by chrome as seen in
task manager] when number of chrome instances launched by chrome driver
are 3 or more in my case.

*Sample code to reproduce issue [C# console project ] :*

static void Main(string[] args)
{

Parallel.For(1, *n*, i =>

{
IWebDriver driver = new ChromeDriver(@"D:\SeleniumDrivers");
driver.Navigate().GoToUrl("http://www.bing.com");
});

}

Run for various values of "*n>=2"* and see the difference in time it takes to navigate all instances of chrome that has been launched.Also, observe the CPU utilization of chrome instances launched by chrome driver.


*Environment details:*

OS : Windows 8 Enterprise (64-bit)

Chrome version : 44.0.2403.89 m (64-bit)

WebDriver version : 2.46

ChromeDriver version : 2.15.322448


Regards,

Nish26
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f913d1fb-e4ed-49c1-b48c-62171972b90e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Shawn McCarthy
2015-09-09 14:21:13 UTC
Permalink
Maybe not related, but Chromedriver 2.15 says it only supports up to Chrome
43 (https://chromedriver.storage.googleapis.com/2.15/notes.txt). Have you
tried ChromeDriver 2.16, 2.17, 2.18, or 2.19 ?
Post by Nish26
Hi All,
When trying to run chrome driver , while i am able to launch multiple
copies of chrome almost instantly , total time from launch to navigate
action takes a long time which is directly related to number of instance i
have launched in parallel.
I need to run my test cases on multiple instance of chrome at the same
time[10-15 instances or even more]. While Slow chrome launch/navigation is
unacceptable , high CPU usage by chrome does not allow me to continue
smoothly with my test cases. Any help in these two areas would be
appreciated.
*Observations:*
Single instance launch + Navigate : 3993 ms
Two instances launch + Navigate : 6102 ms
Three instances launch + Navigate : 14685 ms
Four instances launch + Navigate : 16125 ms
and so on. Also , CPU usage increased to 100%[usage by chrome as seen in
task manager] when number of chrome instances launched by chrome driver
are 3 or more in my case.
*Sample code to reproduce issue [C# console project ] :*
static void Main(string[] args)
{
Parallel.For(1, *n*, i =>
{
driver.Navigate().GoToUrl("http://www.bing.com");
});
}
Run for various values of "*n>=2"* and see the difference in time it takes to navigate all instances of chrome that has been launched.Also, observe the CPU utilization of chrome instances launched by chrome driver.
*Environment details:*
OS : Windows 8 Enterprise (64-bit)
Chrome version : 44.0.2403.89 m (64-bit)
WebDriver version : 2.46
ChromeDriver version : 2.15.322448
Regards,
Nish26
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/396657c4-5671-4966-91c6-c9050ad22d1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nish26
2015-09-10 11:41:22 UTC
Permalink
I tried with ChromeDriver 2.19 . Chrome browsers are not holding up the CPU anymore . However, i could not see any major improvement in parallel launch time. It's still taking time based on the number of instances of chrome i launch . Also, i can see spikes in CPU usage during launch and whenever i try to do some automation on chrome. In my case CPU usage is still going up to 100% with just 3-5 browsers.
Post by Shawn McCarthy
Maybe not related, but Chromedriver 2.15 says it only supports up to
Chrome 43 (https://chromedriver.storage.googleapis.com/2.15/notes.txt).
Have you tried ChromeDriver 2.16, 2.17, 2.18, or 2.19 ?
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/199fe6d6-362b-4c8f-aeeb-a028370a2d82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MWQA
2015-09-10 11:47:10 UTC
Permalink
Maybe try Selenium Grid for this sort of thing? I use multiple Jenkins
jobs against Sauce labs personally
Post by Nish26
I tried with ChromeDriver 2.19 . Chrome browsers are not holding up the CPU anymore . However, i could not see any major improvement in parallel launch time. It's still taking time based on the number of instances of chrome i launch . Also, i can see spikes in CPU usage during launch and whenever i try to do some automation on chrome. In my case CPU usage is still going up to 100% with just 3-5 browsers.
Post by Shawn McCarthy
Maybe not related, but Chromedriver 2.15 says it only supports up to
Chrome 43 (https://chromedriver.storage.googleapis.com/2.15/notes.txt).
Have you tried ChromeDriver 2.16, 2.17, 2.18, or 2.19 ?
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2053ec84-3353-4cb0-ad8a-73291f9c3880%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nish26
2015-09-10 12:47:52 UTC
Permalink
I will definitely give Selenium Grid a try.
Anyways even after upgrade , still in some cases , chrome browser keeps
using up to 40% CPU for a while [up to 1 min in some cases] after
automation has completed. Eventually , CPU usage drops to normal. I will
also try to upgrade to chrome version 45 and check with that.
Post by MWQA
Maybe try Selenium Grid for this sort of thing? I use multiple Jenkins
jobs against Sauce labs personally
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/bc765d1a-4302-46f6-8c92-98de81f9cb5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MWQA
2015-09-10 11:10:09 UTC
Permalink
Might be Chrome. Version 45 is meant to be signifcantly better at memory
mangement - assuming there is a ChromeDriver version released which
supports Chrome v45
Post by Nish26
Hi All,
When trying to run chrome driver , while i am able to launch multiple
copies of chrome almost instantly , total time from launch to navigate
action takes a long time which is directly related to number of instance i
have launched in parallel.
I need to run my test cases on multiple instance of chrome at the same
time[10-15 instances or even more]. While Slow chrome launch/navigation is
unacceptable , high CPU usage by chrome does not allow me to continue
smoothly with my test cases. Any help in these two areas would be
appreciated.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/32a18af8-6d36-433c-84d1-cf9b1a30b6a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Aaron Shaver
2015-10-21 20:27:33 UTC
Permalink
Nish,

I wanted to chip in and say I have this same problem at my company. We run
4 Selenium tests in parallel on a beefy Azure VM (8 cores) and experience
massive CPU use when they run. I'm running ChromeDriver 2.20, the latest
stable version, and Chrome 46, again latest stable, so I don't think it's
anything that's been fixed recently.

-Aaron
Post by Nish26
Hi All,
When trying to run chrome driver , while i am able to launch multiple
copies of chrome almost instantly , total time from launch to navigate
action takes a long time which is directly related to number of instance i
have launched in parallel.
I need to run my test cases on multiple instance of chrome at the same
time[10-15 instances or even more]. While Slow chrome launch/navigation is
unacceptable , high CPU usage by chrome does not allow me to continue
smoothly with my test cases. Any help in these two areas would be
appreciated.
*Observations:*
Single instance launch + Navigate : 3993 ms
Two instances launch + Navigate : 6102 ms
Three instances launch + Navigate : 14685 ms
Four instances launch + Navigate : 16125 ms
and so on. Also , CPU usage increased to 100%[usage by chrome as seen in
task manager] when number of chrome instances launched by chrome driver
are 3 or more in my case.
*Sample code to reproduce issue [C# console project ] :*
static void Main(string[] args)
{
Parallel.For(1, *n*, i =>
{
driver.Navigate().GoToUrl("http://www.bing.com");
});
}
Run for various values of "*n>=2"* and see the difference in time it takes to navigate all instances of chrome that has been launched.Also, observe the CPU utilization of chrome instances launched by chrome driver.
*Environment details:*
OS : Windows 8 Enterprise (64-bit)
Chrome version : 44.0.2403.89 m (64-bit)
WebDriver version : 2.46
ChromeDriver version : 2.15.322448
Regards,
Nish26
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a2f7533f-e7d7-4ab2-bbf2-12070f7e60e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MWQA
2015-10-22 12:46:38 UTC
Permalink
I'm not sure how you are running your tests but if you currently start
ChromeDriver in your test setup and your teardown stop ChromeDriver, you
could alternatively (I believe), start ChromeDriver using the .exe, then
configure the remote url to the port number that the server is running
on... you'd just need to remember to kill the Driver manually when your
tests finish. I think Dave Haeffner has posted something like that
previously if you wanted to search for it
Post by Aaron Shaver
Nish,
I wanted to chip in and say I have this same problem at my company. We run
4 Selenium tests in parallel on a beefy Azure VM (8 cores) and experience
massive CPU use when they run. I'm running ChromeDriver 2.20, the latest
stable version, and Chrome 46, again latest stable, so I don't think it's
anything that's been fixed recently.
-Aaron
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/02e53df1-1cdd-491f-af39-5c33a048f61e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
y***@gmail.com
2016-01-29 08:17:43 UTC
Permalink
I am facing same problem. Is this problem related to chrome
driver(currently i am using chrome driver 2.20)?
Post by Nish26
Hi All,
When trying to run chrome driver , while i am able to launch multiple
copies of chrome almost instantly , total time from launch to navigate
action takes a long time which is directly related to number of instance i
have launched in parallel.
I need to run my test cases on multiple instance of chrome at the same
time[10-15 instances or even more]. While Slow chrome launch/navigation is
unacceptable , high CPU usage by chrome does not allow me to continue
smoothly with my test cases. Any help in these two areas would be
appreciated.
*Observations:*
Single instance launch + Navigate : 3993 ms
Two instances launch + Navigate : 6102 ms
Three instances launch + Navigate : 14685 ms
Four instances launch + Navigate : 16125 ms
and so on. Also , CPU usage increased to 100%[usage by chrome as seen in
task manager] when number of chrome instances launched by chrome driver
are 3 or more in my case.
*Sample code to reproduce issue [C# console project ] :*
static void Main(string[] args)
{
Parallel.For(1, *n*, i =>
{
driver.Navigate().GoToUrl("http://www.bing.com");
});
}
Run for various values of "*n>=2"* and see the difference in time it takes to navigate all instances of chrome that has been launched.Also, observe the CPU utilization of chrome instances launched by chrome driver.
*Environment details:*
OS : Windows 8 Enterprise (64-bit)
Chrome version : 44.0.2403.89 m (64-bit)
WebDriver version : 2.46
ChromeDriver version : 2.15.322448
Regards,
Nish26
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b5e8082a-2e8e-49f1-b142-c99692fecbe4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...