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

-vvvv reported memory is only accurate on single-core systems #6201

Closed
divinity76 opened this issue Dec 14, 2021 · 3 comments
Closed

-vvvv reported memory is only accurate on single-core systems #6201

divinity76 opened this issue Dec 14, 2021 · 3 comments

Comments

@divinity76
Copy link

Bug report

with -vvvv phpstan prints roughly how much memory it uses, and with

parameters:
        parallel:
                maximumNumberOfProcesses: 1

the figure is pretty much accurate and agrees with how much ram htop says its using, but on multi-core systems without maximumNumberOfProcesses: 1 , the figure is not even remotely accurate, like on my 12-core system (dual Xeon X5670, hyperthreading disabled) phpstan was reporting like 800MB ram usage while the real ram usage was closer to 10GB - i suspect phpstan is only reporting the ram usage of the very first worker, rather than summing up the combined ram of all the workers?

Code snippet that reproduces the problem

the actual command i was using when noticing the problem was

nice --adjustment=-18 ./vendor/bin/phpstan analyse '/home/hans/projects/ead' --level 0 -vvvv --xdebug --configuration=phpstan.neon --ansi 2>&1 | tee EADLog1639496280.log

and phpstan.neon contained

parameters:
        excludePaths:
                - docker-db/*
#        parallel:
#                maximumNumberOfProcesses: 1

and the EAD folder is a large ~14,000 php files proprietary codebase, cannot share it

Expected output

the memory usage should be roughly accurate?

Did PHPStan help you today? Did it make you happy in any way?

judge is still out, but it looks promising ^^

@mergeable
Copy link

mergeable bot commented Dec 14, 2021

This bug report is missing a link to reproduction on phpstan.org.

It will most likely be closed after manual review.

@ondrejmirtes
Copy link
Member

Duplicate of #4683

@ondrejmirtes ondrejmirtes marked this as a duplicate of #4683 Dec 14, 2021
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants