DynamoDB本地糟糕的性能 [英] DynamoDB Local Terrible Performance

查看:105
本文介绍了DynamoDB本地糟糕的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DynamoDB Local需要100毫秒以上的时间来对我的表执行一次put操作。文档说,本地数据库的吞吐量被忽略,仅受硬盘/计算机速度的限制。

DynamoDB local is taking 100+ ms to perform a single put operation against my table. The docs say that throughput is ignored for local dbs, and is only limited by the speed of the hard disk/computer.

与mongodb相比,我的写入吞吐量比100%慢它应该是。 我可以做些什么来加快对DynamoDB Local的写入速度吗?

Compared to mongodb my write throughput is 100x slower than it should be. Is there something I can do to speed writes to DynamoDB local up?

我将尝试批量放置,但问题仍然存在。此时,输入我的(相当大的)测试数据需要花费我几年的时间。

I will try batch puts, but the problem still remains. At this point, it's going to take me years to input my (rather large) test data.

我正在使用Clojure和Faraday作为客户端api,但已经确认这不是瓶颈。

I'm using Clojure and Faraday as my client api, but have confirmed that is not the bottleneck.

我已经以25%的价格实施了批次,这减慢了速度将总进度降低约25倍:)。因此,即使批量处理,每个项目的写入速度仍约为120毫秒。

I've implemented batches at 25 per, which slowed down the total progress by about a factor of 25 :). So, even with batches, I'm getting a write speed of about 120 ms per item.

使用Mongo,即使带有保守的WriteConcern / ACKNOWLEDGED标志,也可以使每件商品大约250微秒(快500倍),而且甚至不需要发送批处理。因此,问题不是我的硬盘驱动器或操作系统。

Using Mongo, even with conservative WriteConcern/ACKNOWLEDGED flag, results in about 250 microseconds per item (~500x faster), and that's without even needing to send batches. So it's not my harddrive or OS that's the problem.

推荐答案

距离您提出问题已有一段时间了,但我仍然想提供一些背景信息。

It's been a while since you asked your question but I still want to give some background information.

MongoDB是如此之快,因为它在将更新写入磁盘之前将其缓存在内存中。您可以在官方的MongoDB常见问题解答此处

MongoDB is so fast because it buffers the updates in memory before writing them to disk. You can read more about this in the official MongoDB FAQ here

DynamoDBLocal相当慢,因为它在后台使用了SQLite数据库(您可以通过打开*进行检查。与其他数据库相比,DynamoDBLocal目录中具有SQLite浏览器的db文件)和
SQLite的写入速度非常慢。更多信息此处

DynamoDBLocal on the other hand is quite slow because it uses a SQLite database behind the scenes (You can check this by opening the *.db file in the DynamoDBLocal directory with a SQLite Browser) and SQLite has very slow write speeds compared to other databases. More info here.

DynamoDBLocal只是用于本地开发的基本工具,该工具将DynamoDB API的子集包装在一个简单的SQLite数据库周围。真正的DynamoDB当然不依赖SQLite,而且速度要快得多。

DynamoDBLocal is just a basic tool for local development that wraps a subset of the DynamoDB API around a simple SQLite database. The real DynamoDB, of course, does not rely on SQLite and is much faster.

这篇关于DynamoDB本地糟糕的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆