cephfs_performance_optimization

背景

最近由于工作需要,需要使用cephfs替换nas,因此搭建了ceph集群,并在此基础上创建了cephfs文件系统供其他同学使用,刚开始的时候还好,但是随着使用的用户数及文件数目越来越多,cephfs的性能问题就逐渐凸显出来,他们反馈在cephfs客户端上操作时会出现以下两种情况:

  1. 通过vim编辑文件时十分卡顿,打开或者保存文件有很明显的延时;
Read More

Jewels-and-Stones

问题描述:

You’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in Sis a type of stone you have. You want to know how many of the stones you have are also jewels.

The letters in J are guaranteed distinct, and all characters in J and S are letters. Letters are case sensitive, so "a" is considered a different type of stone from "A".

Example 1:

Read More

第三篇:手动部署Ceph集群

上篇介绍了部署Ceph的环境准备工作,本篇主要内容是介绍手动部署Ceph的全过程。

环境

集群环境

第二篇,我们创建了3台虚拟机,虚拟机配置如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@ceph-1 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 99G 0 part
├─centos-root 253:0 0 50G 0 lvm /
├─centos-swap 253:1 0 2G 0 lvm [SWAP]
└─centos-home 253:2 0 47G 0 lvm /home
sdb 8:16 0 2T 0 disk
sdc 8:32 0 2T 0 disk
sdd 8:48 0 2T 0 disk
sde 8:64 0 600G 0 disk
sr0 11:0 1 1024M 0 rom

Read More

第一篇:Ceph简介

Ceph架构简介

最近工作中要使用ceph作为底层存储架构,故对其进行了一番调研,本篇乃ceph系列的第一篇。

Ceph

Ceph是一个统一的分布式存储系统,设计初衷是提供较好的性能、可靠性和可扩展性。

Ceph项目最早起源于Sage就读博士期间的工作(最早的成果于2004年发表),并随后贡献给开源社区。在经过了数年的发展之后,目前已得到众多云计算厂商的支持并被广泛应用。RedHat及OpenStack都可与Ceph整合以支持虚拟机镜像的后端存储。

Read More

Single Number

问题描述:

Given an array of integers, every element appears twice except for one. Find that single one.

Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?

Read More

Best Time to Buy and Sell Stock II

问题描述:

Say you have an array for which the ith element is the price of a given stock on day i.

Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times). However, you may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).

Read More