Dan Kenigsberg has submitted this change and it was merged.

Change subject: utils: Add execCmd sync mode failing stress tests
......................................................................


utils: Add execCmd sync mode failing stress tests

This patch adds couple of tests that stress exceCmd sync mode under high
concurrency. I added the tests to ensure that the next patch, avoiding
AsyncProc in sync mode, does not introduce any regressions.

I tested this on two 8 cores machines with 16G or RAM. One is i7-3770
running RHEL 6.5, and the other i7-4770 running Fedora 19. I run
utilsTests.py 10 times on each machine, with the next patch and with
current code.

When run with the next patch (using Popen.communicate), using 200
threads:

- Python cpu usage is about half of maximum (400% of 800%)
- Load average in top up to 60
- utilsTests.py completes in 75 on the faster machine, and 170 seconds
  on the other.
- All 10 runs completed successfully.

When run with the current code (using AsyncProc.communicate), it was too
slow with 200 threads, so I used only 50 threads:

- test_write_stdin_read_stderr always fail immediately with OSError,
  even with 1 thread.
- Python cpu usage reach close to maximum (798% of 800%)
- Load average in top up to 45
- utilsTests.py completes in 98 seconds on the faster machine and 158
  seconds on the other.
- On the RHEL 6.5 machine, the tests seems to deadlock after 8 runs,
  consusing 100% cpu with no progress for 40 minutes.

Seems that the current execCmd implementation is not reliable and
scalable as the built-in Python implementation.

Change-Id: I57ebd5faf028ccfc928a8b2e7ae47008f0970c23
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/27784
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M tests/utilsTests.py
1 file changed, 114 insertions(+), 0 deletions(-)

Approvals:
  Nir Soffer: Verified
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/27784
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I57ebd5faf028ccfc928a8b2e7ae47008f0970c23
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to