Создаю новую VPSку. Устанавливаю MySQL 5.5 и тут
131018 12:45:42 [Note] Plugin 'FEDERATED' is disabled. 131018 12:45:42 InnoDB: The InnoDB memory heap is disabled 131018 12:45:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins 131018 12:45:42 InnoDB: Compressed tables use zlib 1.2.7 131018 12:45:42 InnoDB: Using Linux native AIO 131018 12:45:42 InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up. InnoDB: Warning: io_setup() attempt 1 failed. InnoDB: Warning: io_setup() attempt 2 failed. InnoDB: Warning: io_setup() attempt 3 failed. InnoDB: Warning: io_setup() attempt 4 failed. InnoDB: Warning: io_setup() attempt 5 failed. 131018 12:45:44 InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts. InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf 131018 12:45:44 InnoDB: Fatal error: cannot initialize AIO sub-system 131018 12:45:44 [ERROR] Plugin 'InnoDB' init function returned error. 131018 12:45:44 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 131018 12:45:44 [ERROR] Unknown/unsupported storage engine: InnoDB 131018 12:45:44 [ERROR] Aborting
Увеличиваем, включаем MySQL на новой VPS, и смотрим сколько же используется aio-nr
Теперь добавим в /etc/sysctl.conf
Интересная тема на форуме ovz mysqld not running in all CT's. RedKrieg пишет
I ran into the same issue and was able to work around it. There are two solutions I found.
Disable AIO in all containers' my.cnf files by adding "innodb_use_native_aio=0"
Increase the global limit for the server in "/proc/sys/fs/aio-max-nr"
The first solution is simple and causes MySQL to revert to the previous 5.1 style behavior. Unfortunately if you're offering service to end-users, they may remove this setting or set up their own MySQL instance.
The second solution is more nuanced, but probably better if you can't rely on the containers' configurations to be static or if you want the enhanced performance of Asynchronous I/O.
On my CentOS5 based Virtuozzo node, the default value of aio-max-nr is 65536. A default MySQL 5.5 install will use 2661 of these, leading to the maximum of 24 started MySQL instances with the setting enabled. You should tune the value to be greater than max_instances * 2661 to ensure that you don't run into this issue.
In my case, I opted for the first solution because I didn't have time to test the effects of having this many AIO tasks happening in parallel on a single hardware node and I understand the 5.1 behavior very well for large tasks. If you opt to go with option 2 on a large install, I'd be interested in hearing how it worked out for you (as I'm sure many others reading this thread are as well).
All the docs I could find related to this: