initial 2.0.0-a3 commit

This commit is contained in:
jerry
2020-10-03 23:00:18 +08:00
parent f91d24aaaa
commit da584e0542
28 changed files with 580 additions and 225 deletions

View File

@@ -1,4 +1,6 @@
<?php
/** @noinspection PhpFullyQualifiedNameUsageInspection */
/** @noinspection PhpComposerExtensionStubsInspection */
global $config;
/** bind host */
@@ -25,7 +27,7 @@ $config['crash_dir'] = $config['zm_data'] . 'crash/';
/** 对应swoole的server->set参数 */
$config['swoole'] = [
'log_file' => $config['crash_dir'] . 'swoole_error.log',
'worker_num' => 2,
'worker_num' => 8,
'dispatch_mode' => 2,
'max_coroutine' => 30000,
//'task_worker_num' => 4,
@@ -37,7 +39,8 @@ $config['light_cache'] = [
"status" => true,
"size" => 2048, //最多允许储存的条数需要2的倍数
"max_strlen" => 4096, //单行字符串最大长度需要2的倍数
"hash_conflict_proportion" => 0.6 //Hash冲突率越大越好但是需要的内存更多
"hash_conflict_proportion" => 0.6, //Hash冲突率越大越好但是需要的内存更多
"persistence_path" => $config['zm_data']."_cache.json"
];
/** MySQL数据库连接信息host留空则启动时不创建sql连接池 */