Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't start 8 parallel browsers on 8 cores CPU #215

Closed
zxxc opened this issue Jan 5, 2017 · 11 comments
Closed

Can't start 8 parallel browsers on 8 cores CPU #215

zxxc opened this issue Jan 5, 2017 · 11 comments
Labels
🐛 Bug Something isn't working

Comments

@zxxc
Copy link

zxxc commented Jan 5, 2017

We have about 190 js files with unit test and on windows 10 x64 i7 8 cores 32gb ram
stryker tries to start 8 chromes in parallel and fails with exception that number of opened files is exceeded

i've tried to find a way to increase this limit, but no luck
https://social.technet.microsoft.com/Forums/office/en-US/f2bc07f5-5a2d-40ef-b6f1-7957581bd74c/increasing-the-maximum-open-files-per-session-limit?forum=winserverfiles

for now i fixed it with maxConcurrentTestRunners:5 and CPU load on my PC is about 90-95%
i want to create separate build plan on CI to create reports on weekends and our server much more powerful than my PC

for future maybe it will be acceptable to combine such files into one before start browsers with mutations or smth like that

@nicojs
Copy link
Member

nicojs commented Jan 9, 2017

@zxxc thanks for creating this issue.

I think the problem is not that there are 8 child processes starting up, rather Stryker is trying to copy all files into 8 sandboxes at once (without using graceful-fs or something like that).

We should make sure that small file system issues do not result in a crash of Stryker.

@nicojs nicojs added the 🐛 Bug Something isn't working label Jan 9, 2017
@zxxc
Copy link
Author

zxxc commented Jan 27, 2017

if it will be useful, i've made screenshot with new graceful-fs

image

@nicojs
Copy link
Member

nicojs commented Jan 27, 2017

@zxxc how did you test it? Because its not released yet. Still hoping that it will work.

@zxxc
Copy link
Author

zxxc commented Jan 27, 2017

i've made a clone from git for stryker and stryker-api
npm build for both

and copied all files into node_modules/ in my project directory
then remove limit from stryker.conf.js

and run with first part of my files (11 000 mutations)

What should i do to test your fix correctly?
Log:
gracefulFstest.txt

I tried to find 'graceful' in node_modules/stryker this is result (to be sure that your changes is on a right place):
image

@zxxc
Copy link
Author

zxxc commented Jan 27, 2017

Is it helps us if we will create one file with all my js code after stryker collect coverage and before stryker will run my 8 browsers?
I have same problem on my teamcity server, but it has only 2 cores on windows 7 and i even can't start 2 browsers (for now i splitted all my files into 4 parts and i run stryker 4 times with maxConcurrentTestRunners:1)
I plan to run stryker on machine with 32 cores in future, but this machine works under Windows, and seems it's better for now to find linux machine with 32 cores

@nicojs
Copy link
Member

nicojs commented Jan 27, 2017

I see what the problem is. You forgot to build the typescript files. The best thing you can do is:

  • Clone stryker, checkout the master branch
  • Do an npm install
  • Install grunt-cli: npm i -g grunt-cli
  • Build stryker using grunt build
  • Go to your project. Uninstall stryker: npm uninstall stryker
  • Install your local stryker: npm i file:../../stryker-mutator/stryker (should be the path to stryker using forward slashes)
  • Than start stryker like you normally would

If you do the search for graceful again, you should see the *.js files.

Running on 32 cores would be awesome. Probably you would want to limit the concurrency a bit, maybe put it on 20 or something.

@zxxc
Copy link
Author

zxxc commented Mar 31, 2017

image
@nicojs hi, i tried new version and it's working now on my machine :)

@nicojs
Copy link
Member

nicojs commented Apr 6, 2017

@zxxc very cool stuff!! Can we close this issue?

@nicojs
Copy link
Member

nicojs commented Apr 6, 2017

@zxxc on a side note: could you PM me your home address and t-shirt size? So we can send you a t-shirt: https://stryker-mutator.github.io/images/stryker-t-shirt.png

@zxxc
Copy link
Author

zxxc commented Apr 6, 2017

yeah, we can close this issue

@simondel
Copy link
Member

simondel commented Apr 7, 2017

Great to hear that you got it working!!

@simondel simondel closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants