原文:架构师
架构师(JiaGouX)
我们都是架构师!
分布式系统中经常需要考虑对象(或者记录、文件、数据块等)的读写的顺序以及并发访问问题。通常来说,如果两个对象没有共享的资源,就可以进行并发的访问,如果有共享的部分,就需要对这部分资源进行加锁;而对于同一个对象的并发读写(尤其是并发写更新时),就需要注意顺序性以及并发访问的控制,以免数据错乱。本文主要对ceph中对象读写的顺序及并发性保证机制进行介绍。
原文:架构师
架构师(JiaGouX)
我们都是架构师!
分布式系统中经常需要考虑对象(或者记录、文件、数据块等)的读写的顺序以及并发访问问题。通常来说,如果两个对象没有共享的资源,就可以进行并发的访问,如果有共享的部分,就需要对这部分资源进行加锁;而对于同一个对象的并发读写(尤其是并发写更新时),就需要注意顺序性以及并发访问的控制,以免数据错乱。本文主要对ceph中对象读写的顺序及并发性保证机制进行介绍。
#!/usr/bin/env bash | |
# | |
# Usage: | |
# s3-get.sh <bucket> <region> <source-file> <dest-path> | |
# | |
# Description: | |
# Retrieve a secured file from S3 using AWS signature 4. | |
# To run, this shell script depends on command-line curl and openssl | |
# | |
# References: |
#!/usr/bin/env bash | |
# | |
# Usage: | |
# s3-get.sh <bucket> <region> <source-file> <dest-path> | |
# | |
# Description: | |
# Retrieve a secured file from S3 using AWS signature 4. | |
# To run, this shell script depends on command-line curl and openssl | |
# | |
# References: |
原文:架构师
架构师(JiaGouX)
我们都是架构师!
ceph后端支持多种存储引擎,以插件式的方式来进行管理使用,目前支持filestore,kvstore,memstore以及最新的bluestore,目前默认使用的filestore,但是因为filestore在写数据前需要先写journal,会有一倍的写放大,并且filestore一开始只是对于机械盘进行设计的,没有专门针对ssd做优化考虑,因此诞生的bluestore初衷就是为了减少写放大,并针对ssd做优化,而且直接管理裸盘,从理论上进一步减少文件系统如ext4/xfs等部分的开销,目前bluestore还处于开发优化阶段,在jewel版本还是试用版本,并且最新的master相比jewel已经做了大的重构,预期会在后续的大版本中稳定下来成为默认的存储引擎。本文基于master分支对bluestore存储引擎进行分析。
# Copyright 2017 Cloudbase Solutions SRL | |
# All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d -o rgw_max_objs_per_shard=50 -o rgw_reshard_thread_interval=60
bin/ceph -c ceph.conf daemon out/radosgw.8000.asok config get rgw_max_objs_per_shard
bin/ceph -c ceph.conf daemon out/radosgw.8000.asok config get rgw_dynamic_resharding
#!/bin/bash | |
## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.** | |
## **This updated version has more options and less hardcoded variables.** | |
# Take one argument from the commandline: VM name | |
if ! [ $# -eq 1 ]; then | |
echo "Usage: $0 <node-name>" | |
exit 1 | |
fi |
qemu-img create -f qcow2 /pool/vms/xp.qcow2 50G | |
sudo virt-install --connect qemu:///system -n xp -r 512 --disk path=/pool/vms/xp.qcow2,size=50 \ | |
-c /pool/iso/windows/en_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73974.iso \ | |
--graphics vnc,listen=0.0.0.0,port=65322 --noautoconsole \ | |
--os-type windows --os-variant winxp |