php.ini选项

swoole.aio_thread_num

设置AIO异步文件读写的线程数量,默认为2

swoole.display_errors

关闭/开启Swoole错误信息,默认开启

swoole.socket_buffer_size

设置进程间通信的Socket缓存区尺寸,默认为8M

swoole.fast_serialize

swoole_server中的task功能中是否使用swoole_serialize对异步任务数据序列化

swoole.use_shortname

是否启用短别名。

类名映射关系

下划线类名风格 命名空间风格
swoole_serverSwoole\Server
swoole_clientSwoole\Client
swoole_processSwoole\Process
swoole_timerSwoole\Timer
swoole_tableSwoole\Table
swoole_lockSwoole\Lock
swoole_atomicSwoole\Atomic
swoole_bufferSwoole\Buffer
swoole_redisSwoole\Redis
swoole_eventSwoole\Event
swoole_mysqlSwoole\MySQL
swoole_mmapSwoole\Mmap
swoole_channelSwoole\Channel
swoole_serializeSwoole\Serialize
swoole_http_serverSwoole\Http\Server
swoole_http_clientSwoole\Http\Client
swoole_http_requestSwoole\Http\Request
swoole_http_responseSwoole\Http\Response
swoole_websocket_serverSwoole\WebSocket\Server

需要swoole-1.8.1或更高版本


  • 刘钢Gary

    能否写出这些配置的默认值

  • 彭俊

    少说了一个 swoole.fast_serialize

  • oldchiken

    关闭了错误信息,还会提示,swoole.display_errors = Off 是这样配置的吗?????

  • 雨花

    这个值设置多少合适 swoole.aio_thread_num