Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Adding command line parameter to specify the number of HHVM Server Th… #80

Merged
merged 9 commits into from
Mar 22, 2017

Conversation

kevand900
Copy link
Contributor

…reads as well as Benchmark Concurrency.

These options are to be paired with '--i-am-not-benchmarking'

For HHVM Server threads:
--hhvm-server-threads=
Default is 100

For Benchmark Concurrency
--benchmark-concurrency=
Default is 200

Kevin Anderson added 2 commits February 10, 2017 05:16
…reads as well as the benchmark concurrency.

In order to use these options they must be paired with '--i-am-not-benchmarking'

For HHVM Server Threads use:
--hhvm-server-threads=<desiredNumber>
The default is 100

For Benchmark Concurrency use:
--benchmark-concurrency=<desiredNumber>
The default is 200
…reads as well as Benchmark Concurrency.

These options are to be paired with '--i-am-not-benchmarking'

For HHVM Server threads:
--hhvm-server-threads=<number>
Default is 100

For Benchmark Concurrency
--benchmark-concurrency=<number>
Default is 200
} else {
$this->benchmarkConcurrency = '200';
}
$bmConcurrency = __DIR__.'/PerfSettings.php';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, don't modify this file.

  • nothing that modifies 'git status' is OK
  • moving it to PerfOptions is the correct thing to do.

@gdbentley
Copy link
Contributor

IMHO, these should not require --i-am-not-benchmarking. These need to be tuned in order to benchmark the full capability of a machine. We've already run into a machine where 100 server threads constrains us to fewer software threads than available hardware threads.

Kevin Anderson added 4 commits February 27, 2017 03:57
… (--server-threads=<NUM>) and the BenchmarkConcurrency (--benchmark-concurrency=<NUM>).

Revising the method that these are set, using a setter method in PerfSettings.php for the BenchmarkConcurrency, set from PerfOptions.php.
For ServerThreads we append the dhhvm.server.thread_count to the hhvmExtraArguments array. This is just a wrapper for the optional method of specifying via --hhvm-extra-arguments=-dhhvm.server.thread_count=<NUM>.

if(array_key_exists('server-threads', $o)){
$this->serverThreads = $this->args['server-threads'];
$this->hhvmExtraArguments[count($this->hhvmExtraArguments)] = '-dhhvm.server.thread_count='.$this->serverThreads;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

serverThreads should be set by default to 100, and it should be removed from the config files https://github.com/hhvm/oss-performance/blob/master/conf/php.ini#L20. Probably don't use the hhvm extra args for this, and just add another argument in https://github.com/hhvm/oss-performance/blob/master/base/HHVMDaemon.php#L70


if(array_key_exists('client-threads', $o)){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs a default.

@gdbentley
Copy link
Contributor

@fredemmott Can you take another look and approve?

@@ -107,6 +107,8 @@
public ?string $scriptBeforeWarmup;
public ?string $scriptAfterWarmup;
public ?string $scriptAfterBenchmark;
public ?string $serverThreads = '100';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this not be optionally null? You set a default here, so it should never be null.

public static function BenchmarkConcurrency(): int {
return 200;
return PerfSettings::$benchmarkConcurrency;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we actually remove benchmark concurrency settings here, and use the options instead in base/Siege.php? (So basically just make it similar to the way the serverThreads option works)
I think it will end up cleaner.

@mofarrell
Copy link
Contributor

@gdbentley Everything looks good now, except I added support for fpm. If you could make the number of children variable here https://github.com/hhvm/oss-performance/blob/master/conf/php-fpm.conf.in#L27. This is how other settings like that are written into place https://github.com/hhvm/oss-performance/blob/master/base/PHP5Daemon.php#L87

@mofarrell mofarrell merged commit d4ac30f into facebookarchive:master Mar 22, 2017
kevand900 pushed a commit to kevand900/oss-performance that referenced this pull request Mar 22, 2017
…mote machine to host the mysql database.

This option is to be used with "--i-am-not-benchmarking".
Changes were made in PerfOptions.php for the command line parsing, and DatabaseInstaller.php for installing the database.
Drupal7, Mediawiki, and Wordpress are the targets which support this feature presently.
For more info on how to run please see "Enabling_MySWL_Remote_Connection.txt".

Resolving requested changes.

Resolved requested changes. Added remote db support for all targets.

Making $host local for cleanliness.

updating oss-performance to work with recent changes to invariant sig… (facebookarchive#78)

* updating oss-performance to work with recent changes to invariant signature

* updating change to reflect comments

* changing %s to %f for a numeric value

Update siege blacklist to 3.0

Updated mediawiki to 1.28.

Added setup script, php fpm support, modified batch run to be able to configure databases, fixed tc-print, and perf.

Update fbcode option for use with buck.

Add processor affinity setting "--cpu-fraction".

Add no-jit option, and stat-cache option.

Adding command line parameter to specify the number of HHVM Server Th… (facebookarchive#80)

* Adding command line parameters to change the number of hhvm server threads as well as the benchmark concurrency.
In order to use these options they must be paired with '--i-am-not-benchmarking'

For HHVM Server Threads use:
--hhvm-server-threads=<desiredNumber>
The default is 100

For Benchmark Concurrency use:
--benchmark-concurrency=<desiredNumber>
The default is 200

* Adding command line parameter to specify the number of HHVM Server Threads as well as Benchmark Concurrency.

These options are to be paired with '--i-am-not-benchmarking'

For HHVM Server threads:
--hhvm-server-threads=<number>
Default is 100

For Benchmark Concurrency
--benchmark-concurrency=<number>
Default is 200

* Adding command line parameters to specify the number of ServerThreads (--server-threads=<NUM>) and the BenchmarkConcurrency (--benchmark-concurrency=<NUM>).
Revising the method that these are set, using a setter method in PerfSettings.php for the BenchmarkConcurrency, set from PerfOptions.php.
For ServerThreads we append the dhhvm.server.thread_count to the hhvmExtraArguments array. This is just a wrapper for the optional method of specifying via --hhvm-extra-arguments=-dhhvm.server.thread_count=<NUM>.

* Made it so we do not have to use --i-am-not-benchmarking for --server-threads and --client-threads.

* Resolved review comments.

* Resolving requested changes.

* Resolving requested changes, made pm.max_children variable.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants