月度归档:2020年04月

LNMP 1.6 补充安装MariaDB

如果在安装LNMP1.6时没有安装数据库,可以通过下面命令补充安装数据库
./install.sh db
而不是这个命令
./upgrade.sh mysql
这个命令应该是升级数据库的
安装完毕后lnmp restart

使用outlook 2019收发Gmail

其实outlook 2019已经做的非常智能化了,不需要像以前版本的outlook手动设置参数什么的,但是当你登录gmail账户时可能发现有一个允许授权的按钮是灰色的无法点击,只需要在google account里面打开Less secure app access 就可以了,在下面的URL: https://myaccount.google.com/lesssecureapps

向Linode索要赔偿

今天早上打开邮箱发现Linode给我发的邮件说一个的5美元的VPS暂停了几分钟/几十分钟好像,写了一大堆我也没仔细看,还好这个VPS最近没什么流量了,然后就花一分钟时间回复Ticket说我的线上业务收到了影响要求赔偿,12个小时后回复说给我赔偿了10美元,还引用了一大波TOS,我肯定没耐心看这个的,我估计意思是本来不用给你赔偿的,看你是老客户就给你10美元赔偿了。这个态度还是可以的,我的线上业务的确受到了影响,虽然影响不怎么大。

现在感觉Linode也不是那么靠谱了,硬盘I/O非常不稳定,这个uptime感觉也很一般了,唯一的优点就是目前网络还行吧。

购买独立服务器的策略——合约期

购买独立服务器是很有意思的,和购买VPS体验完全不一样,很多VPS都提供按小时付费的plan,但是独立服务器一般至少是按月起收费,一般年付会有70%-95%的优惠。那么问题来了,要不要按年付费购买独立服务器呢?根据我最近的经验,一般来说按年付费并不是很好的策略,原因有以下几点:
1. 对于不熟悉的机房,不要第一次就按年付费,付款很容易,退款就很容易撕逼了。很多机房的服务器看起来配置很好,其实用户体验很差,拿IPMI来说,很多机房都做不好
2. 配置很容易过时,根据我的经验,100美元/month预算的美国机房用NVME SSD的比较少,大多数是SATA SSD,我觉得最近一年NVME SSD的普及速度会很快。还有由于服务器的设计寿命一般比较长,所以很多机房都有一些破烂服务器,32nm的CPU 45nm的CPU,几万小时的硬盘甚至比你的网龄还长,?
3. 影响现金流。这个就不多说了

vega 56 vmvare 虚拟机白屏问题终于解决了

我的vega 56连接了两块显示器,一块4K的,一块1200 1920的,以前用的是戴尔原装的mini dp线,但是开虚拟机的时候经常白屏,具体表现为整块屏幕变白,主机死机,显卡风扇无限重启

最近换了两根山泽的DP线,质量应该比戴尔原装的mini dp线好一些,最近几天开虚拟机都没有白屏了,开心,哈哈,不过还是有闪屏,不过偶尔闪一下我是可以接受的,以后再换更好的DP线。戴尔原装的mini dp线就是辣鸡,可以直接扔掉了。

不是DP线原因,显卡返修了,目前没有白屏了,再继续观察。看来蓝宝石的AMD显卡有坑

webnx dedicated server benchmark

买了一个webnx Ogden的独服,价格是$109/month, no setup fee, 具体配置如下:

Intel Xeon E-2276G
32GB DDR4 ECC
1.2TB NVMe
1Gbps Port / 100TB
/29 Ipv4
Enable IPMI

打开IPMI发现是ASRock的主板,型号是E3C246D4U,不是supermicro的,据说asrock的主板没有超微的好,不过这个价格也不是很贵。内存是SK Hynix的,型号HMA82GU7CJR8N-VK,感觉也是很一般的,NVME SSD是INTEL SSDPE2ME012T4的,这个NVME SSD,比较奇怪,在网上搜了一下不是长条形的,更像是SATA硬盘。不过intel的固态硬盘肯定不会差的,我还是比较满意的。

跑下分看看

[[email protected]]# wget -qO- bench.sh | bash
----------------------------------------------------------------------
CPU model : Intel(R) Xeon(R) E-2276G CPU @ 3.80GHz
Number of cores : 12
CPU frequency : 799.938 MHz
Total size of Disk : 1177.4 GB (1.5 GB Used)
Total amount of Mem : 31785 MB (383 MB Used)
Total amount of Swap : 15999 MB (0 MB Used)
System uptime : 0 days, 0 hour 1 min
Load average : 0.20, 0.16, 0.06
OS : CentOS 7.7.1908
Arch : x86_64 (64 Bit)
Kernel : 3.10.0-1062.el7.x86_64
----------------------------------------------------------------------
I/O speed(1st run) : 1.0 GB/s
I/O speed(2nd run) : 999 MB/s
I/O speed(3rd run) : 984 MB/s
Average I/O speed : 1002.3 MB/s
----------------------------------------------------------------------
Node Name IPv4 address Download Speed
CacheFly 205.234.175.175 4.74MB/s
Linode, Tokyo2, JP 139.162.65.37 17.9MB/s
Linode, Singapore, SG 139.162.23.4 13.0MB/s
Linode, London, UK 176.58.107.39 18.8MB/s
Linode, Frankfurt, DE 139.162.130.8 16.4MB/s
Linode, Fremont, CA 50.116.14.9 84.2MB/s
Softlayer, Dallas, TX 173.192.68.18 31.4MB/s
Softlayer, Seattle, WA 67.228.112.250 6.04MB/s
Softlayer, Frankfurt, DE 159.122.69.4 7.97MB/s
Softlayer, Singapore, SG 119.81.28.170 7.23MB/s
Softlayer, HongKong, CN 119.81.130.170 8.16MB/s
----------------------------------------------------------------------

[[email protected]]# smartctl --all /dev/nvme0n1p1
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-1062.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number: INTEL SSDPE2ME012T4
Serial Number: CVMD728400581P2WGN
Firmware Version: 8DV101H0
PCI Vendor/Subsystem ID: 0x8086
IEEE OUI Identifier: 0x5cd2e4
Controller ID: 0
Number of Namespaces: 1
Namespace 1 Size/Capacity: 1,200,243,695,616 [1.20 TB]
Namespace 1 Formatted LBA Size: 512
Local Time is: Fri Apr 10 19:32:02 2020 PDT
Firmware Updates (0x02): 1 Slot
Optional Admin Commands (0x0006): Format Frmw_DL
Optional NVM Commands (0x0006): Wr_Unc DS_Mngmt
Maximum Data Transfer Size: 32 Pages

Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 25.00W - - 0 0 0 0 0 0

Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 + 512 0 2
1 - 512 8 2
2 - 512 16 2
3 - 4096 0 0
4 - 4096 8 0
5 - 4096 64 0
6 - 4096 128 0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 30 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 0%
Data Units Read: 911 [466 MB]
Data Units Written: 11,601 [5.93 GB]
Host Read Commands: 28,783
Host Write Commands: 123,836
Controller Busy Time: 0
Power Cycles: 13
Power On Hours: 6
Unsafe Shutdowns: 1
Media and Data Integrity Errors: 0
Error Information Log Entries: 0

Error Information (NVMe Log 0x01, max 64 entries)
No Errors Logged

网络似乎还不错,硬盘通电时间6小时,难道是新的硬盘吗哈哈哈,总体来说还是物有所值,我还是比较满意的。

为什么要从VPS转向Dedicated Server

用linode好几年了,但是有时候发现硬盘的I/O非常不稳定,如下面的这个VPS的benchmark所示,第一次测速只有 9.4 MB/s,这么差的性能已经非常影响线上业务了。究其原因,大概是因为你有一个比较折腾的邻居,因为这些VPS都是用虚拟化技术在同一台Dedicated Server上切出来的,你永远不会知道你的邻居在干什么,所以VPS的硬盘性能注定不会稳定,即使现在的VPS跑分很好看,可能明天就不行了。

[[email protected] ~]# wget -qO- bench.sh | bash
----------------------------------------------------------------------
CPU model : AMD EPYC 7501 32-Core Processor
Number of cores : 2
CPU frequency : 2000.002 MHz
Total size of Disk : 79.0 GB (12.0 GB Used)
Total amount of Mem : 3789 MB (791 MB Used)
Total amount of Swap : 511 MB (17 MB Used)
System uptime : 61 days, 15 hour 3 min
Load average : 0.16, 0.18, 0.15
OS : CentOS 7.7.1908
Arch : x86_64 (64 Bit)
Kernel : 3.10.0-957.el7.x86_64
----------------------------------------------------------------------
I/O speed(1st run) : 9.4 MB/s
I/O speed(2nd run) : 47.0 MB/s
I/O speed(3rd run) : 377 MB/s
Average I/O speed : 144.5 MB/s
----------------------------------------------------------------------
Node Name IPv4 address Download Speed
CacheFly 205.234.175.175 109MB/s
Linode, Tokyo2, JP 139.162.65.37 14.4MB/s
Linode, Singapore, SG 139.162.23.4 10.3MB/s
Linode, London, UK 176.58.107.39 33.3MB/s
Linode, Frankfurt, DE 139.162.130.8 28.9MB/s
Linode, Fremont, CA 50.116.14.9 34.0MB/s
Softlayer, Dallas, TX 173.192.68.18 42.8MB/s
Softlayer, Seattle, WA 67.228.112.250 30.7MB/s
Softlayer, Frankfurt, DE 159.122.69.4 12.1MB/s
Softlayer, Singapore, SG 119.81.28.170 7.88MB/s
Softlayer, HongKong, CN 119.81.130.170 8.74MB/s
----------------------------------------------------------------------

而且普通的linode套餐CPU可能也是共享的,如下图所示,linode推出了Dedicated CPU instances的套餐,按照我的理解,这个套餐的意思应该是CPU独享,但是SSD仍然是共享的,可以看出来,这个价格已经很不划算了,不如自己买独立服务器切小鸡。

hivelocity TPA2 datacenter dedicated server benchmark

[[email protected] ~]# wget -qO- bench.sh | bash
----------------------------------------------------------------------
CPU model : Intel(R) Xeon(R) CPU E3-1230 v5 @ 3.40GHz
Number of cores : 8
CPU frequency : 1820.983 MHz
Total size of Disk : 432.8 GB (1.2 GB Used)
Total amount of Mem : 15709 MB (174 MB Used)
Total amount of Swap : 7935 MB (0 MB Used)
System uptime : 0 days, 0 hour 14 min
Load average : 0.00, 0.01, 0.02
OS : CentOS 7.6.1810
Arch : x86_64 (64 Bit)
Kernel : 3.10.0-957.el7.x86_64
----------------------------------------------------------------------
I/O speed(1st run) : 349 MB/s
I/O speed(2nd run) : 344 MB/s
I/O speed(3rd run) : 344 MB/s
Average I/O speed : 345.7 MB/s
----------------------------------------------------------------------
Node Name IPv4 address Download Speed
CacheFly 205.234.175.175 110MB/s
Linode, Tokyo2, JP 139.162.65.37 12.5MB/s
Linode, Singapore, SG 139.162.23.4 9.92MB/s
Linode, London, UK 176.58.107.39 22.4MB/s
Linode, Frankfurt, DE 139.162.130.8 19.8MB/s
Linode, Fremont, CA 50.116.14.9 31.3MB/s
Softlayer, Dallas, TX 173.192.68.18 37.7MB/s
Softlayer, Seattle, WA 67.228.112.250 17.4MB/s
Softlayer, Frankfurt, DE 159.122.69.4 11.5MB/s
Softlayer, Singapore, SG 119.81.28.170 5.39MB/s
Softlayer, HongKong, CN 119.81.130.170 6.45MB/s
----------------------------------------------------------------------

[[email protected]]# smartctl --all /dev/sda
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-957.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Crucial/Micron BX/MX1/2/3/500, M5/600, 1100 SSDs
Device Model: MICRON_M510DC_MTFDDAK480MBP
Serial Number: 160511B4E42F
LU WWN Device Id: 5 00a075 111b4e42f
Firmware Version: 0013
User Capacity: 480,103,981,056 bytes [480 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 6
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat Apr 4 04:51:23 2020 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x80) Offline data collection activity
was never started.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 2235) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 6) minutes.
Conveyance self-test routine
recommended polling time: ( 3) minutes.
SCT capabilities: (0x0035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 100 050 Pre-fail Always - 0
5 Reallocate_NAND_Blk_Cnt 0x0032 100 100 001 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 001 Old_age Always - 26000
12 Power_Cycle_Count 0x0032 100 100 001 Old_age Always - 37
170 Reserved_Block_Count 0x0033 100 100 010 Pre-fail Always - 0
171 Program_Fail_Count 0x0032 100 100 001 Old_age Always - 0
172 Erase_Fail_Count 0x0032 100 100 001 Old_age Always - 0
173 Ave_Block-Erase_Count 0x0033 100 100 000 Pre-fail Always - 31
174 Unexpect_Power_Loss_Ct 0x0032 100 100 001 Old_age Always - 26
184 Error_Correction_Count 0x0033 100 100 050 Pre-fail Always - 0
187 Reported_Uncorrect 0x0032 100 100 001 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 001 Old_age Always - 0
194 Temperature_Celsius 0x0022 072 060 000 Old_age Always - 28 (Min/Max 19/40)
195 Cumulativ_Corrected_ECC 0x003a 100 100 001 Old_age Always - 1498566
197 Current_Pending_Sector 0x0032 100 100 001 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 100 001 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 100 100 001 Old_age Always - 0
202 Percent_Lifetime_Remain 0x0018 100 100 001 Old_age Offline - 0
206 Write_Error_Rate 0x000e 100 100 001 Old_age Always - 0
247 Host_Program_Page_Count 0x0032 100 100 000 Old_age Always - 765505467
248 FTL_Program_Page_Count 0x0032 100 100 000 Old_age Always - 484034379

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Vendor (0xff) Completed without error 00% 7157 -
# 2 Vendor (0xff) Completed without error 00% 25 -

SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

可以看出来TPA2机房网络还可以的,SSD速度感觉很一般了,整体配置还行。硬盘的型号是MICRON_M510DC_MTFDDAK480MBP,是美光2015年的老盘了,通电时间26000小时?,运气真是不咋地