大网数据广告活动
服务器运维问答

GlusterFS alternative for file upload website

· 52CE 我爱测

I have a few file upload websites, with files ranging from hundreds of kilobytes to a few gigabytes. Currently I have all files in a distribute-replicate Gluster volume on a few servers. My biggest problem with Gluster is speed. …

问题原文

原帖链接 · Alex Dumitru · CC BY-SA 3.0

I have a few file upload websites, with files ranging from hundreds of kilobytes to a few gigabytes.

Currently I have all files in a distribute-replicate Gluster volume on a few servers.

My biggest problem with Gluster is speed.

For example I have a folder with ~80,000 images averaging 500KB each and it took me a couple of hours to change the images' owner.

For the moment everything is pretty decent, but I'm worried about having much more files and the time it will take to work with them.

What alternatives do I have? Am I doing anything wrong with Gluster?

This is my gluster configuration:

performance.cache-size: 1GB
performance.cache-refresh-timeout: 60
performance.cache-max-file-size: 100KB
cluster.choose-local: true
performance.readdir-ahead: on
performance.io-thread-count: 16
client.event-threads: 3
server.event-threads: 3

已采纳解答

原帖链接 · shodanshok · CC BY-SA 3.0

Any distributed filesystem will suffer when executing batch operations on large number of files: after all, it had to propagate all changes to a remote machine, and latency skyrocket compared to local host only. This can be especially noticeable when executing metadata-changing operations: not touching real data, they are very fast locally; however, remote replication will be totally latency-bound.

You have basically two solutions:

  • use a file-sharing approach, uploading your files on a specific box and exporting them via NFS. While NFS is not a silver bullet (and it is not a speed monster), when coupled with client-side caching it can perform adequately
  • use an asynchronous file-replication system as lsyncd (or something based on rsync)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-09-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。