ZFS replace drive before it fails

The main Virtual Machine Server was seeing hardware failures and ZFS “scrub not zero bytes”. One of the (cheap) Hitachi Ultrastar 2TB disks was starting to fail, after only 1.5 years. Smartctl was showing 53 recent errors.

  pool: vmstorage
 state: ONLINE
  scan: scrub repaired 1.75M in 5h12m with 0 errors on Tue Oct  1 07:12:22 2019
config:

        NAME                                            STATE     READ WRITE CKSUM
        vmstorage                                       ONLINE       0     0     0
          mirror-0                                      ONLINE       0     0     0
            ata-Hitachi_HUA723020ALA641_YFG31Y3A-part2  ONLINE       0     0     0
            ata-Hitachi_HUA723020ALA641_YFG4GJ8A-part2  ONLINE       0     0     0

/var/log/messages was showing stuff like this, over and over:

Sep 15 03:03:42 dellt3600 smartd[19459]: Device: /dev/sdc [SAT], 831 Currently unreadable (pending) sectors

Looking in /dev/disk/by-id/*, the failing drive has a serial number of YFG4GJ8A.

So, the setup for these commands became:

export DISK_GOOD=/dev/disk/by-id/ata-Hitachi_HUA723020ALA641_YFG31Y3A-part2
export DISK_BAD=/dev/disk/by-id/ata-Hitachi_HUA723020ALA641_YFG4GJ8A-part2
export DISK_REPLACE=/dev/disk/by-id/ata-Hitachi_HUA723020ALA641_YGJ0JSYA-part2

The command to remove the failing, but not yet failed, drive from the mirror:

zpool detach vmstorage $DISK_BAD

(At this point, I shutdown the machine, and had to swap disks since there was only room for two 3.5″ HDDs).

After reboot, the command to add the new disk into the mirror:

zpool attach vmstorage $DISK_GOOD $DISK_REPLACE

Resilvering 1.25TB took 4h56m.

Note: if you “pre-partition” your ZFS disks (like I do), then you also need the “root” disk to run parted:

export DISK_REPLACE_ROOT=/dev/disk/by-id/ata-Hitachi_HUA723020ALA641_YGJ0JSYA
parted $DISK_REPLACE_ROOT

Use ‘unit s’ to create the partitions with exactly the same sector counts as the drive being replaced.

Just recording the replacement drive: $42 – HGST/Hitachi Ultrastar 7K3000 2TB 7200RPM Enterprise Grade Sata III For the record – the drive arrived new, with 0 hours power-on time. Vendor was DBSKY.

Posted in ZFS | Comments Off on ZFS replace drive before it fails

Core i7-9700K Build

Some facts on the CPU: it is currently #67 on PassMark [17,329, single thread 2,909] cpubenchmark.net. It was launched 2018 October. It used 14mm architecture and does not have hyperthreading. Since the “i7-9700”, i.e. non-K, does not exist (and may never exist) this overclock-capable CPU was the choice, and it will never see overclocking. This also meant that the first time in 20+ years, a separate cooler was needed. Gone are the days of buying top-50 CPUs. The #2 i9-9940X comes in with a 28,121 score. The AMD Ryzen Threadripper and Xeon E5 make up the bulk of the CPUs higher on the list.

The video card was a Micro Center refurbished item, and kicked off this entire build. GPU prices and RAM prices have “kind of” recovered at this point – so the system finally got built, after a 10 month delay. The price was $380, plus a $50 2-year protection plan. Currently, new GTX 1080 Founders Edition sells for $620 from 3rd party (“Quick-Ship”), and a GTX 1080 MSI sells for $575 fulfilled by Amazon. Neither Amazon nor Newegg are directly selling 1080s now. The 1080s have been available for ~3 years, the RTX2070s for ~2 months. 1080s sell for $500, 2070s sell for $510, 2080s sell for $750. One benchmark shows the 2080 at #6, the 2070 at #8 , and the 1080 at #12. CUDA cores: 1080=2560, 2070=2304, 2080=2944.

The “old style” Windows Experience Index, with its maximum of 7.9, is not available in Windows 10. The “winstat” application reported a systemscore=9.2, memoryscore=9.3, cpuscore=9.3, videoencodescore=9.9, diskscore=9.2.

To honor the fastest/most expensive video card in the house, a new monitor was purchased. The Dell 1600×1200 Ultrasharp monitors needed a bit of an upgrade. The new Dell 27″ G-Sync cost a bit more money (it looks like about $100 more) because of the G-Sync. It has a 1ms response time, and 170 degree horizontal viewing, with a resolution of 2560×1440. The first purchase from Micro Center had to be returned after 18 days, because 25 thin horizontal white stripes appeared on the right-hand side, from the top to almost the bottom. The second purchase from Best Buy included a 4-year Geek Squad product replacement plan.

All product links are from the actual vendor.

Item Product Cost
CPU Intel Core i7 9700K 3.6Ghz (4.9GHz Turbo) Socket 1151 95W Eight-Core Desktop Eight threads $400
Cooler Cooler Master Hyper 212 EVO Universal CPU Cooler $33
RAM CORSAIR Vengeance LPX 32GB (2 x 16GB) 288-Pin DDR4 SDRAM DDR4 2666 (PC4 21300) Memory Kit Model CMK32GX4M2A2666C16 $240
Motherboard Gigabyte Z390 Aorus Pro WiFi LGA 1151 ATX Intel Motherboard $160
Power Supply Corsair CX Series 650 Watt 80 Plus Bronze Certified Non-Modular Power Supply (CP-9020122-NA) CX650 $60
Video NVIDIA Founders Edition GeForce GTX 1080 Single-Fan 8GB GDDR5X PCIe Video Card Refurbished $430
Case Corsair Carbide 300R Mid Tower Case (Black) CC-9011014-WW $48
M.2 Drive Samsung 970 EVO 250GB – NVMe PCIe M.2 2280 SSD (MZ-V7E250BW) $78
SS Drive Samsung 860 EVO 1TB 2.5 Inch SATA III Internal SSD (MZ-76E1T0B/AM) $128
HD Drive None
BD/DVD/CD Samsung Optical Drive SH-224DB/BEBE $21
Keyboard
Mouse
OS Windows 10 Pro 64-bit – OEM $150
Total $1748
Tax 7.529% $131
Monitor Dell S2716DGR 27″ WQHD 2560×1440, 144Hz, 1ms response, HDMI and DP, G-Sync Gaming LED Monitor $508
Grand Total $2387

Returned monitor:
Dell S2716DGR 27″ WQHD 144Hz HDMI DP G-Sync Gaming LED Monitor, $430+$33

tax newegg 7.526%
tax microcenter 7.529%

For additional game storage:

SS Drive, 2021 Sept, Samsung 860 EVO 1TB SATA III Internal SSD (MZ-77E1T0B/AM) $138

Posted in Computer Builds, Core-i7 | Comments Off on Core i7-9700K Build

CPU Comparison

The table includes both “as built” and “dreaming only” CPUs.

Rank
2018
CPU PassMark Benchmark
2 i9-7908XE@2.6 27,786
36 i9-9900K@3.6 20,156
38 i7-7900X@3.3 20,046
67 i7-9700k@3.6 17,329
96 i7-8700k@3.7 15,960
264 i7-4770k@3.5 10,091
401 i7-2600k@3.4 8,444
510 i5-6500@3.2 7,240
Posted in Core-i5, Core-i7 | Comments Off on CPU Comparison

Peripherals

Current and historical record of Mice and Keyboards and Monitors.

Item Product Year Cost
Mouse Logitech G403 Wired Optical Gaming Mouse with RGB Lighting 2018 Nov $35
Mouse Logitech G Pro Gaming FPS Mouse with Advanced Gaming Sensor 2016 Dec $52
Mouse Corsair Raptor M30 Gaming Mouse 2014 Mar $50
Mouse Logitech G400s 910-003589 Optical Gaming Mouse 2013 Sep $45
Mouse Logitech M510 Wireless Computer Mouse 2011 Dec $25
Mouse Logitech MX 581 Gaming-Grade Optical Mouse 2011 Feb $37
Mouse Logitech G5 2-Tone 6 Buttons Wired 2000 dpi 2007 Mar $46
Mouse Redragon M601 Wired Gaming Mouse, 3200 dpi 2018 May $12
Mouse Corsair Dark Core RGB Wired or Wireless Gaming Mouse, 16,000 dpi 2018 Dec

$62

Mouse Razer DeathAdder Essential Gaming Mouse, 6,400 dpi (replaces Corsair Dark Core, above) 2021 Nov

$23

Keyboard + Mouse Amazon Basics Wired Keyboard and Wired Mouse 2013 Nov $15
Keyboard Corsair K60 Pro low profile mechanical keyboard. With cherry MX low profile SPEEDKeyswitches. 2022 Nov Sep $48
Keyboard Logitech G213 Prodigy Gaming Keyboard. With Mech-Dome keys that are full height, deliver a full 4mm travel distance, 50g actuation force, and a quiet sound operation. 2021 Sep $45
Keyboard Rosewill Mechanical Gaming Keyboard with Cherry MX Brown Switches (RK-9000V2 BR). 2021 Feb $90
Keyboard Corsair Vengeance K70 Mechanical Keyboard – Red LED – Cherry MX Brown Switches 2014 Oct $130
Keyboard Corsair Raptor K30 Gaming Keyboard 2014 Sep $33
Keyboard Logitech K400 2.4GHz Wireless Touch Keyboard 2012 Mar

$40

SSD External Samsung T5 Portable SSD 1TB 2022 Jan

$89

Monitor ASUS VP28UQG 28″ 4K (3840×2160) 60Hz LED Monitor 2020 Sep

$250 + $30 2 yr replacement

Monitor GIGABYTE M32U 32″ 4K UHD (3840×2160) Freesync 144Hz IPS Gaming Monitor 2022 Oct

$645

Posted in Computer Builds | Comments Off on Peripherals

Java Command Line Parsers Taxonomy

Ever wanted to see a complete list of Java command-line parser libraries? Here is the project for you.

The git project javacommandlineparsers contains a list of Java command-line parser libraries, in JSON format, and transformed to markup, csv and html.

It also shows how to perform groovy templating with gradle. The Readme.md file is generated from a template using SimpleTemplateEngine, and a .csv and .html files are generated with groovy.text.markup.MarkupTemplateEngine.

The raw .json content is available here.

Posted in Software Engineering, Software Project | Comments Off on Java Command Line Parsers Taxonomy

Java command-line argument parser taxonomy

Every once in a while, at the beginning of a new project, I start the search for a command-line argument parsing library in Java. This post shows the results of examining the field as of mid 2018. This post serves both as a “which to use” and as a “which have been evaluated, and found wanting” guide.

* Best So Far
JCommander v1.71
http://jcommander.org/
annotation, good documentation, custom parser, validation

* Honorable Mention
picocli v3.3
http://picocli.info/
annotation, good documentation — documentation looks suspiciously like it is patterned after JCommander

* Pretty Good
args4j
http://args4j.kohsuke.org/
field-based, annotation-based, unclear if “–long-Name” is supported

JewelCLI
http://jewelcli.lexicalscope.com/
annotation-based, interface-based but can be instance-based with setters, has short and long names

* Also-Rans

jopt-simple
https://pholser.github.io/jopt-simple/
Key-Value – the opposite of a good library. Many of the libraries below share this same deficiency.

JArgs
http://jargs.sourceforge.net/
single “parse” call with array of options, Key-Value get value where key is the option

Jakarta Commons CLI
http://commons.apache.org/proper/commons-cli/
like JArgs, except key is “String”, not option object

argparser
http://www.cs.ubc.ca/~lloyd/java/argparser.html
create individual options, where options are “holders”, parse() into the holders

JSAP
http://www.martiansoftware.com/jsap/
old (2008), not well documented

JCommando
http://jcommando.sourceforge.net/
it generates .java, but still requires an additional .jar

Posted in Software Engineering | Comments Off on Java command-line argument parser taxonomy

Secret Share 1.4.4 on Maven Central

Secret Share in Java on Maven Central

Just completed a release of the Secret Share in Java project to Maven Central.

Search for it using search.maven.org.
Or, go to SecretShare-1.4.4 directly.

GroupId: com.tiemens
ArtifactId: secretshare
Version: 1.4.4

This release fixes three issues.
1 – the symbolic link in buildSrc has been removed to help with builds on Windows
2 – the “-prime” argument was documented to note that it must be first (issue #6)
3 – more bits are used for coefficient generation (issue #8)

Posted in Software Engineering, Software Project | Comments Off on Secret Share 1.4.4 on Maven Central

Virtual Machine Server

The goal of this machine was to replace the oldest machine build recorded on this blog – the 2009 Core i7 920 build. This is the current workhorse virtual machine server.

The approach taken (refurbished) was a direct result of (1) DDR4 RAM prices being high, (2) Video card (GTX 1080) prices being way too high, and (3) Intel 8700 CPU just not being exciting.

So instead of new, once I ran across these refurbished Dell Precision T3600 machines at newegg.com, I set a budget at $400 and got the best available. After a 10% bump in the budget, the 64GB machine was the “just right” choice. It has a 6-core CPU and a decent clock speed.

Some facts on the CPU: the Xeon E5-2640@2.5GHz is currently #255 on PassMark [9,500] compared with the i7-920@2.67GHz at #683 [4,938] There are multiple versions of the e5-2640 – v4, v3, v2 and original.

Some facts on the system: The Dell Precision T3600 was reviewed in 2012 by AnandTech at a review price of $4,450 – but that machine only had 8GB of memory (and a better CPU and Graphics card). So call it a wash – $4,500 retail price six years ago. Ebay has a 4x16GB kit for sale for $340 right now.

All product links are from the actual vendor.

Item Product Cost
System Dell Precision T3600 Workstation
Cached Newegg
$439
CPU Intel Xeon E5-2640 2.5GHz 6 cores socket 2011 incl.
RAM 4x 16GB DDR3 DRAM 1333 RDIMM ECC, 12,913 MB/s incl.
Motherboard Single CPU socket 2011, Intel C600 chipset, 2x USB 3.0 incl.
Power Supply 635 Watt externally removable toolless 80 Plus Gold incl.
Video NVIDIA Quadro 600 (96 CUDA Cores, 1 GB DDR3) DVI-I/DisplayPort “Entry 3D” incl.
DVD/CD Thin form factor DVD incl.
Case 2x 3.5″, 2x 2.5″ bays incl.
SSD Drive 128GB Vertex reused
HHD Drive 2x Hitachi Ultrastar 2TB 7200RPM HUA723020ALA641 Enterprise $60 each $120
Keyboard/Mouse
OS Either Ubuntu 18.04 or Centos 7.4
Software VMWare Workstation 14 Pro $250
Total $810

Posted in Computer Builds | Comments Off on Virtual Machine Server

ZFS Case Upgrade

The original ZFS machine has grown a bit over the years. It started with two 2TB hard drives, then got two more, then finally two more. The “little” NZXT case has more than enough drive slots, but this setup violated one of my two rules for storage systems:

“Da Rules”:

  1. Just because a case has N drive bays does not mean it has enough cooling for N drive bays
  2. RAID5 is not enough

These two rules were a result of stuffing 6 drives in a nice Lian-Li aluminum case that had a 6-bay internal cage (these events predate this recorded history). One day, it lost a drive. After replacement, but during the re-silvering, it lost a second drive. And thus the entire array was gone. The first drive may or may not have been lost to heat. The second drive was definitely lost to heat.

The ZFS machine addressed rule #2 by having drives in a mirror and using active scrubs. The active scrubs make sure that both drives have a readable copy of each sector. So, when a disk is lost, you are reasonably sure the re-silver will has something valid to read. This machine has lost 2 drives (not at the same time). Yes, re-silvering was stressful.

To address rule #1, my ZFS machine finally gets the case it deserved in the first place: a Rosewill RSV-L4500 – 4U. At $116, this case has 15 drive slots and 8 fans. The three-sets-of-five bays lets me install the drives with an air gap of one drive between any two drives.

Here are the smartctl temperatures before and after:


Drive NZXT case Rosewill Case (immediate/24hrs)
1 43 31/32
2 42 31/32
3 35 33/33
4 36 34/34
5 37 34/32
6 35 35/33

Drives #3 and #4 are the original, “babied” WD 2TB black drives. What little cooling existed in the NZXT, these drives got, so there was not much movement in temperature.

Posted in Computer Builds, ZFS | Comments Off on ZFS Case Upgrade

JRebirth quick evaluation

Want to see how you can quickly tell that somebody wrote 79,695 lines of Java on a completely wasted library/framework? Watch how quickly JRebirth comes to a head-slap fail:

1) Visit http://www.jrebirth.org/
2) Under Documentation, click on Installation, create the build.gradle
3) Under Documentation, click on “Create your first Application”
4) Create .java for SampleApplication – find out it depends on SampleModel. Ok, then
5) Create .java for SampleModel — find out it depends on SampleView

Hard fail.

A model that has a compile-dependency on the view? “You keep using that word. I do not think it means what you think it means.” Dig a bit further into the source code, and you see the phrase “the class type of the view managed by this model” over and over. The model managing the view?

A model never depends on a view in order to compile, for one simple reason: a correctly designed model can support multiple views simultaneously.

There is no reason to investigate JRebirth further – their project went off the rails at step one.

Posted in Software Engineering | Comments Off on JRebirth quick evaluation