Skip to Content.
Sympa Menu

perfsonar-user - RE: [perfsonar-user] SD card lifespan

Subject: perfSONAR User Q&A and Other Discussion

List archive

RE: [perfsonar-user] SD card lifespan


Chronological Thread 
  • From: "Whitworth, Luke" <>
  • To: Mark Feit <>, "" <>
  • Subject: RE: [perfsonar-user] SD card lifespan
  • Date: Fri, 11 Sep 2020 11:16:46 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cranfield.ac.uk; dmarc=pass action=none header.from=cranfield.ac.uk; dkim=pass header.d=cranfield.ac.uk; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l6HPxs0yoCfHgh2rwxvzxm9APDOCPJw41N78+PnV2Wc=; b=UgZODEIrABOJBLQInFsd/dW+LOTcjcjJ6HgoEkFkz3gfOVriGX4lVIALPUMocRPr9FeqdpT+cLFbpvQ5MgkV4fEISVjW0yuyVPf6QkYaBDzYDGt+d8R2j+WAPVK8tGR20Dysucs1ENNNA+Z7JxLDuyM46jRZOqDPtIh6tc9P/1+vawDZ/rMSZXjwzf4KG6KTszlL1P2B4cWWr44oTEaQ22Fn7g6JViSBwhmUeizy5McdfonzrKewy68DsLKcGGpNcvmijCOyb7ISlTa71NiekU9V/lHiM2IlI8GSCDG6KSisA2ZlL49SyoCyXguviO8o2XZm/7n0g1xYHU0zfYvg5g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dZECNgHrkBCE8xvsb4P0sO+NmT928zZbUIn4XoOKVGtvX+hw1wdJlpgRkSKzfsHIVmAeiMxEBx2Y8p6Xh5LStXuYu4n9yufq/z5R/l07xFNi5fjquOw08EdlHywOjW4ezO2BIbxhUXgHsKlI9veaT6DzxndmruK9mA7vn22iyjK3aHDLNzTklulG3TG9MFWi8+izo340b6jFJxfT6m+eD2n1CY3w1v4c+6L/EnmdjGmCmSt0o7m2xW526k7erl33hLK0lFvmbEJSEuNhq+CBh7KLRuRtg5C/3AZiYE/VXUagQqitUk1xg4l3695Mhm5o+kDHUN8gqMd3bm7GwBbJ6A==
  • Msip_labels: MSIP_Label_76ec77b0-1566-4e6c-8f07-2f97449b5aa9_Enabled=true; MSIP_Label_76ec77b0-1566-4e6c-8f07-2f97449b5aa9_SetDate=2020-09-11T11:14:42Z; MSIP_Label_76ec77b0-1566-4e6c-8f07-2f97449b5aa9_Method=Standard; MSIP_Label_76ec77b0-1566-4e6c-8f07-2f97449b5aa9_Name=Internal Business; MSIP_Label_76ec77b0-1566-4e6c-8f07-2f97449b5aa9_SiteId=31dca259-f714-4c48-ba5c-aa96dcf60aaa; MSIP_Label_76ec77b0-1566-4e6c-8f07-2f97449b5aa9_ActionId=6c043435-dcdc-42c3-a4de-3994e1cc3cc0; MSIP_Label_76ec77b0-1566-4e6c-8f07-2f97449b5aa9_ContentBits=0

Just to say thanks for the help with this.  Spent the morning looking into overlayfs and had a nice enough solution, then stumbled across:

 

https://wiki.archlinux.org/index.php/Anything-sync-daemon

 

Compiled it, told it to look after /var and seemingly life is now very happy.

 

Much appreciate the help and comments from all.  Have great weekends!

 

Luke

 

From: Mark Feit <>
Sent: 09 September 2020 21:56
To: Whitworth, Luke <>;
Subject: Re: [perfsonar-user] SD card lifespan

 

Whitworth, Luke writes:

 

Seems though that postgres, specifically the pscheduler db, are still generating continual writes so are therefore our current suspect.  I’ve been looking at having just a simple central postgres server to point the Pi’s to, but am hitting issues in so much as if I specify a different DB name during the initial install it still seems to create a pscheduler database that’s got the schema in it, and an empty db with my chosen name. 

… 

Just wondering if what I’m trying to achieve is even possible, or if I just need to look at a way to tune the write level of postgres maybe…….

 

As you discovered in a subsequent post, there are external programs the database needs to execute on the local system.  There are architectural reasons for it that will be a fact of life until there’s a compelling reason to change it.

 

perfSONAR has a split constituency with opposing needs: network operators that field robust hardware to do high-speed testing and campuses wanting to do mass deployments at low cost, which means less-capable systems.  Our choice of architecture tried to split the difference but, ultimately, favors the network operators who provide most of the labor.  Fortunately, small systems have become a lot more capable than they were a few years ago, and that helps close the gap.  We don’t anticipate any architectural changes

 

Potentially but of course that would incur additional cost, I’m currently looking at the network booting options too.  There’s a few ways to achieve this I would guess but the ideal for me is to have the SD card handling the OS etc. with all the heavy stuff off on remote / alternate storage.

 

I can offer a few suggestions:

 

Evaluate the flash you’re using to make sure it’s up to the job.  Inexpensive flash isn’t built with components that can endure a lot of write cycles, and the controllers in the vast majority of cards don’t do anything to maximize them.  An application like this one will effectively blow a hole in the card by writing the same blocks repeatedly.  There are cards that do wear leveling, but you have to go find them and verify with the manufacturer that they actually do it.  (Look for cards designed for surveillance, industrial or embedded applications.)   Some brands list theirs as high-endurance but really mean they have more environmental tolerance.  On this side of the pond, the premium for a card that does wear leveling is a few dollars.  There also cards available with SLC flash that can take many more write cycles, but at their price point, it’s cheaper to strap an external spinning USB drive to the Pi and be done with it.

 

If you’ve got RAM to spare and don’t mind the system losing state across reboots, use AuFS to mount a RAM disk atop the PostgreSQL data.  That would keep all of the database activity in memory.   A less-extreme version of this would be to set a high commit time on the filesystem that holds /var since the contents of that are largely expendable.

 

Remote storage is also a possibility; an iSCSI or NFS volume for /var would probably solve the problem, or you could just remote boot the entire thing.   The hazard here is that without a separate interface dedicated to storage, the perfSONAR node will have a dependency on the network it measures, which isn’t a good thing.  Also, depending on what’s being measured, the extra traffic may color some of the measurements.  I’d do this as a last resort.

 

HTH.

 

--Mark

 




Archive powered by MHonArc 2.6.19.

Top of Page