- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个小型 OpenVZ 容器。2 个核心和 4096MB RAM。
我有mysql数据库(总大小为80MB InnoDb)
当我执行 100 个查询(例如 INSERT ON DUPLICATE KEY UPDATE)时,很少有查询的执行时间总是超过 1 秒
mysql> SHOW PROFILE;
+----------------------+----------+
| Status | Duration |
+----------------------+----------+
| checking permissions | 0.000040 |
| creating table | 0.000056 |
| After create | 0.011363 |
| query end | 1.231525 |
| freeing items | 0.000089 |
| logging slow query | 0.000019 |
| cleaning up | 0.000005 |
+----------------------+----------+
7 rows in set (0.00 sec)
当我关闭二进制日志记录时,它有所帮助。所以问题可能出在硬盘上。并在查询执行期间写入二进制日志时发生。
如果我用 tarantool 替换 mysql 会有帮助吗?据我所知,tarantool 也编写二进制日志。
我有percona mysql
mysql> select version();
+-----------------+
| version() |
+-----------------+
| 5.6.25-73.1-log |
+-----------------+
1 row in set (0.01 sec)
这是 my.cnf
[client]
default-character-set = utf8mb4
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
# GENERAL #
user = mysql
default-storage-engine = InnoDB
socket = /var/lib/mysql/mysql.sock
pid-file = /var/lib/mysql/mysql.pid
# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
# DATA STORAGE #
datadir = /var/lib/mysql/
# BINARY LOGGING #
#log-bin = /var/lib/mysql/mysql-bin
#expire-logs-days = 14
#sync-binlog = 1
# CACHES AND LIMITS #
tmp-table-size = 128M
max-heap-table-size = 128M
query-cache-type = 1
query-cache-size = 32M
max-connections = 1000
thread-cache-size = 128
open-files-limit = 65535
table-definition-cache = 1024
table-open-cache = 2048
# INNODB #
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 256M
innodb_log_buffer_size = 32M
innodb-flush-log-at-trx-commit = 0
innodb-file-per-table = 1
innodb-buffer-pool-size = 1G
innodb_buffer_pool_instances = 1
# LOGGING #
log-error = /var/lib/mysql/mysql-error1.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /var/lib/mysql/mysql-slow.log
long_query_time = 1
log-queries-not-using-indexes = 1
#PERCONA
log_slow_verbosity = microtime,query_plan,innodb
最佳答案
是的,Tarantool 写入“binlogs”(WAL - 预写日志记录)。
毫无疑问,tarantool 比 mysql 更快。但可能 mysql 需要更多的调整。抱歉,我对 mysql 调优不太了解。
关于mysql - tarantool 对 OpenVZ 有帮助吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36176627/
在 Tarantool 中,Lua 代码作者希望 Tarantool 调度执行时是否使用了纤程?当 Lua 代码作者想要控制执行时,是否使用协程(在 Tarantool/LuaJIT 过程中)? 最佳
我正在 Tarantool vinyl 数据库上实现微服务,需要做出基本的架构决策——我应该为所有数据使用一个大空间,还是使用具有相同元组格式的多个空间。 该空间将用作许多应用程序实例的某种状态存储。
我已经在 Raspberry Pi 7inch 上安装了 tarantool,并希望尽量减少它与 HDD(SD 卡)的交互。有没有简单的方法可以做到这一点。硬盘的实际用途是什么? 最佳答案 这是一个广
如何在不重新启动应用程序的情况下在 tarantool cartridge 中执行热重载代码? 最佳答案 为了找到问题的最佳解决方案,了解您要实现的目标非常重要。有 2 种可能的情况: 您使用包管理器
我做了自动增量索引: box.space.metric:create_index('primary', { parts = {{'id', 'unsigned'}},
有几种方法可以在 Tarantool 中获得时间: 使用 clock模块 使用 fiber.time功能 使用 os.date 但是使用日期的正确方法是什么? 最佳答案 首先,Unix epoch 有
我在 tarantool 墨盒(集群)上有一个默认应用程序。 我想连接到集群的路由器。我使用命令: tarantoolctl connect admin:_password_@localhost:33
我将 Tarantool 与 vshard 模块一起使用。当设置bucket_id时,数据分布在整个集群中。每个节点都有自己的一组bucket_id。如何创建一个空间,以便在每个节点(字典)上都可以完
目前我们的应用程序使用 tarantool 提供的日志模块,但正在寻找一种将日志收集到 graylog 的方法。最好的方法是什么? 最佳答案 根据 graylog 文档,它可以用作 syslog 服务
我正在使用 tarantool/tarantool:2.6.0 Docker 镜像(目前最新的)和为项目编写 lua 脚本。我试图找出如何查看调用结果 print()功能。如果没有 print() 工
我想在一次调用中从 Tarantool 选择多条记录,但不知道如何将多个键传递给 space:get 或 space:select 最佳答案 您可以使用 Lua 以及 SQL 来完成此操作。 1) 在
如何获取空间中的最后一个元组?这里的最后一个元组是具有最大主键值的元组 local a = box.space.SPACE:len() box.space.SPACE:get{a} 这个变体不合适
我正在尝试从头开始在 Docker 中启动 Tarantool(没有现有数据)。我使用他们在 Tutorial 中建议的 Docker 命令并在 MacOS 10.15.6 (Catalina) 上的
我在 Tarantool 中有以下空间模式 box.schema.space.create('customer') format = { {name = 'id', type = 'strin
设置: tarantool 实例,使用 memtx/vinyl 存储。 box.cfg.snapshot_period(memtx 获取磁盘快照的频率)设置为 14400(每 4 小时)。 用户几乎永
我一直在使用关系数据库,最近决定将性能关键服务从 SQL Server 迁移到 Tarantool,希望能够利用快速的内存搜索和处理。在计划迁移时,我有几个问题。 我有一个包含大约一百万条记录的表,其
使用 tarantool,为什么我要记录这些奇怪的消息: 2016-03-24 16:19:58.987 [5803] main/493623/http/XXX.XXX.XXX.XXX:57295 t
我已经安装了 tarantool (tarantool_box) 和 tarantool-client。我可以启动 tarantool /usr/bin/tarantool_box --backgro
如何一次从一个空间中选择两个或多个字段的条件?我没有在文档中找到示例。 最佳答案 有两种方法可以做到这一点:使用 SQL 或使用较低级别的 lua API。 第一个要求您设置空间格式(参见 here
如何一次从一个空间中选择两个或多个字段的条件?我没有在文档中找到示例。 最佳答案 有两种方法可以做到这一点:使用 SQL 或使用较低级别的 lua API。 第一个要求您设置空间格式(参见 here
我是一名优秀的程序员,十分优秀!