2021-08-18.log

mntmnthe imx8mq has CAAM (hardware crypto accelerator) so that is supposed to help with LUKS00:00
mntmnbut afaik still slower than unencrypted. i will do a benchmark later00:00
mntmn(i run encrypted)00:00
chartreuseOh okay, I was thinking there was no acceleration so it'd be cutting hard into the CPU usage to be doing LUKS00:01
chartreuseI might end up changing over to LUKS before I end up with too many files on the drive that wiping and migrating would take forever00:03
chartreuseIf it can still manage 200MB/s or so it wouldn't be too much of a hit to use for the security gains00:03
mntmnok i will check later and get back to you00:07
chartreuseThanks!00:08
mntmnchartreuse: (write test on encrypted nvme partition)01:04
mntmnmntmn@reform:~$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc01:04
mntmn1024+0 records in01:04
mntmn1024+0 records out01:05
mntmn1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.13438 s, 151 MB/s01:05
mntmnread tests:01:05
mntmn Timing cached reads:   1756 MB in  2.00 seconds = 878.45 MB/sec01:05
mntmnTiming buffered disk reads: 692 MB in  3.01 seconds = 230.22 MB/sec01:05
mntmnTiming O_DIRECT cached reads:   454 MB in  2.01 seconds = 226.30 MB/sec01:05
mntmnTiming O_DIRECT disk reads: 726 MB in  3.00 seconds = 241.70 MB/sec01:05
chartreuseWhat too did you use for the read tests?01:06
chartreuseWith the same dd command I'm only getting 164MB/s writes so major performance hit there01:07
chartreuseWith bigger block sizes I can get over 220MB/s, so I'm guessing performance is doing just fine with the encryption01:08
mntmnfor read i did hdparm -tT01:10
mntmnand then hdparm -tT --direct01:11
chartreuseI'm getting essentially the same numbers there. Probably would be a better test with something like fio that'll try different sizes rather than sequential01:11
chartreuseBut looks like little overhead from encryption01:11
chartreuse Timing cached reads:   1676 MB in  2.00 seconds = 837.87 MB/sec01:11
chartreuse Timing buffered disk reads: 704 MB in  3.01 seconds = 234.23 MB/sec01:12
chartreuse Timing O_DIRECT cached reads:   448 MB in  2.01 seconds = 223.32 MB/sec01:12
chartreuse Timing O_DIRECT disk reads: 700 MB in  3.00 seconds = 233.10 MB/sec01:12
chartreuseMight be a cpu overhead doing it, but not any direct performance, so I guess I should give it a try with encrpytion01:13
- mjw (QUIT: Quit: Leaving) (~mark@herd.wildebeest.org)01:13
chartreuse\ls01:14
chartreuseoops XD01:14
mntmnchartreuse: ja surprisingly little01:14
mntmnafaik the bcm in raspi doesn't have hardware support even with similar cores but that makes encryption slow there01:15
chartreuseWhen I re-ran the test again I got slightly harder numbers but still right the same as what you got01:15
mntmntheir arm cores also apparently don't have crypto extensions01:16
chartreuseDid also notice I get some noticable coil whine during the O_DIRECT tests mainly01:16
mntmn(i.e. no AES in the ARM)01:16
chartreuseKinda a low buzzing sound01:16
mntmnyes, got that too ^^01:16
chartreuseYeah, that's what I was concerned with the A53, but if this soc has them that's nice01:16
mntmnalmost reminiscent of a spinning disk...01:16
mntmnyeah imx8mq has them01:17
chartreuseYeah it sounds like rapid head seeking01:17
mntmnit's confusing for sure that a53 is not the same as another a5301:17
chartreuseYep. Does the planned a72 or what it was board also have crypto extensions?01:18
technomancythe other day I learned that the switch SoC has four a53 arm cores just sitting on the die but not usable, next to the four a57 cores it actually uses.01:18
mntmnyes01:18
mntmnthe chip is ls1028a01:18
chartreuseKinda the annoyance with ARM even with the same familly name the chips are all different01:18
mntmnwhich is intended for networking/robotics and stuff01:18
chartreuseNice. Just a shame the higher core count ones cut the gpu01:19
chartreuseSomething like an 8 core A72 would be killer performance wise for this01:19
mntmnyep. might become an option if we find a good low power mobile pcie gpu01:19
mntmnyes i agree01:19
mntmni could make a 2d fpga gpu but meh01:19
chartreuseDoes it have more PCIe lanes on it? Or still the same 1+1 setup?01:20
mntmndepending on what you want to do of course01:20
chartreuseHaving hardware video acceleration is nicer than a 2d gpu01:20
chartreuseFor some things I'd be fine with just a serial terminal text console :)01:20
technomancy"serial terminal text console" you mean like a receipt printer?01:21
mntmnit has sata and we route that to the slot that is nvme now, and route extra pcie lane to the hdmi connector for egpu shenanigans01:21
chartreuseNot sure if the nvme ssd I have supports falling back to sata or not. 01:25
chartreuseI thought the sata ones use a different keying?01:25
mntmnyes but it should fit anyway01:26
chartreuseIt'd be nice to keep pcie going to the nvme slot, but if it doesn't have the ports for it I understand01:26
mntmnwell, it's still experimental at this point01:27
chartreuseA SATA 3 link would probably be faster than the crippled 1x 1.0 or such link going to it now01:27
mntmnyeah01:27
mntmnas soon as the ddr4 works, i'll test which setups make the most sense01:28
chartreuseJust need an ARM SoC with 2x4 pcie lanes. So the NVME can run flat out01:28
mntmnand in the meantime solve those battery drain issues...01:28
mntmni was thinking to do a motherboard with som + mxm01:29
chartreuseYeah. I am also noticing not getting quite the battery life I'd expect from the batteries though I'd need to set up a better monitor on the oled to know for sure01:29
mntmnbut need to find some discrete gpu that is not a huge waste of power01:29
mntmnchartreuse: you can monitor the batteries from linux too01:29
chartreuseHighest draw I was seeing on there was 0.34A so with 1800mAh batteries I'd expect just over 5 hours, but got closer to 3 and a bit before I had to plug in at 8%01:30
chartreuseBut I guess the cutoff point is probably a bit below the listed capacity01:30
chartreuse90% of 1800 would be 1620mAh or 4.8hr at that draw01:31
chartreuseI'll setup a linux script to constantly probe and log the consumption, would be interesting to know how the capacity stacks up by integrating the draw01:32
mntmnhttps://community.mnt.re/t/how-do-you-watch-your-battery-status/280/901:32
mntmnok yeah01:33
chartreuseI've got the keyboard power-down part working. Right now it activates when either the power-off selection has been pressed, or the p key pressed at the menu01:33
mntmnoh awesome!01:33
chartreuseSo just need a signal from the LPC that I can use to enter that state. 01:33
chartreuseAnd then the LPC needs to somehow enter it's own power down state that can be woken by te serial port01:34
chartreuseThough what happens when the LPC hard powers off the system due to the battery being low? I presume the keyboard has no idea at the moment01:35
chartreuseThough I thought the backlight turned off01:35
chartreuseThat's really the only odd state, I'm sure I could add something to linux to send a command to the keyboard during power-off to enter that state01:36
chartreuseBut it'd be easier if the LPC knew the system shutdown01:36
mntmnhmm that's a good point01:37
mntmnyeah the keyboard is currently not informed about this, but we can stick it in the battery status flags that are polled01:38
erlehmannanyone here has reform with encrypted fs?01:38
mntmnerlehmann: yes 01:38
mntmnerlehmann: check the log of a few minutes ago!01:38
mntmnwe were just benchmarking that01:38
chartreuseWell more "benchmarking" as those don't fully reflect normal conditions01:39
erlehmannbenchmarking?01:39
chartreuseTesting the performance compared with non-encrypted nvme01:39
erlehmanno.001:41
erlehmannwhy wouldn't you test LUKS against other *encrypted* devices?01:41
erlehmanni mean answering the question "what is faster, encrypted or unencrypted" is prob not that hard … i just don't get what is actionable from the results01:42
erlehmannbut then again i assume there is no io overhead for encrypted devices01:43
erlehmannjust cpu overhead01:43
chartreuseTo see if the encryption hardware in the cpu is fast enough to deal with the data going to the drive01:44
erlehmanni just can't imagine any situation in which a *benkmark* would be the thing that would tell you that the encryption is too slow01:44
erlehmannyou either notice it during normal operations or not at all01:44
erlehmannam i missing something?01:44
mntmnerlehmann: on raspberry pi the encryption is very slow01:45
chartreuseAnd in this testing, there wasn't any different in peek performance01:45
chartreuseSo even if it is increasing CPU load, it's not bottlenecking the drive 01:45
mntmnerlehmann: because the cores lack hardware crypto extensions01:45
chartreuseReally the bottle neck is the single pcie lane01:45
erlehmannmntmn raspi has no AES accel right01:45
mntmnerlehmann: so people think cortex a53 is the problem01:45
mntmnerlehmann: correct01:45
mntmnerlehmann: also imx8mq has CAAM01:45
chartreuseMy nVME drive is capable of 2-3GB/s and gets 200-300MB/s in the reform01:45
mntmnnaja i am afk for a while watching ds901:46
chartreuseIt's worth testing to see just how much impact having encryption enable affects drive performance01:46
chartreuseSince the benchmarking is going through the encryption layer01:46
chartreuse(At least the dd one did)01:47
erlehmannchartreuse i'd rather write a bunch of small files though01:47
chartreuseThat's why I recommened fio over what mntmn did, but it takes a ton of options to set up nicely01:47
erlehmannmake a tarball of a rootfs and extract it to a folder on the encrypted device01:47
erlehmannthe tarball does not take a ton of options though ;)01:47
chartreuseBecause it'll do stuff like reads and writes at different sizes01:48
erlehmannok raspberry pi is a joke01:48
erlehmannhttps://github.com/keks24/raspberry-pi-luks/issues/201:48
erlehmann> Without encryption: ~200MB/s write and ~250MB/s read.01:48
erlehmannWith encryption: ~85MBs/s write and ~55MB/s read. (WRITE FASTER THAN READ)01:48
chartreuseYes the CPU is the bottleneck there01:48
erlehmann> stick to xchacha12 or xchacha20, since these encryption methods are fast and software-based. The ARM CPU does not support hardware-accelerated AES encryption01:49
erlehmannhmmmmmmm01:49
erlehmannwhich algos did you test anyway01:49
chartreuseAll we did was a quick test between mntmn's setup which is presumably just the LUKS default and my currently unencrypted01:50
chartreuseNothing scientific, just giving me some idea if redoing mine as encrpyted would have a dramatic performance impact or not01:50
chartreuseThe CPU in the reform does have crypto extensions unlike the Pi so those recommendations wouldn't be the fastest here potentially01:51
erlehmannchartreuse the issue contains ways to figure out the idea01:52
erlehmannchartreuse i have never seen a system being dog slow bc of crypto, but i guess i have never used a ranzberry pi for long01:52
chartreuseI'm not too too concerned about the speeds, just as long as they're decent enough01:52
chartreuseOne of my old laptops was a low power core2duo and never had trouple with the encryption on the drive there with a sata ssd on a sata 2 port01:54
chartreuseBut that was the slowest machine I think I bothered on. But didn't have a big impact01:54
chartreuseI'd imagine it'd be more on single core system like a P4 without crypto extensions. Eating a fair bit of CPU to keep up if it can01:54
erlehmanni am typing from a T6002:00
erlehmann; </proc/cpuinfo grep 'model name'02:00
erlehmannmodel name: Intel(R) Core(TM) Duo CPU      T2400  @ 1.83GHz02:00
erlehmannmodel name: Intel(R) Core(TM) Duo CPU      T2400  @ 1.83GHz02:00
technomancyI wonder if you could mod a reform to charge off one of the old thinkpad big barrel chargers02:01
technomancyI've got like twelve of those02:01
swiveli used to have a lot of those but they keep failing near the barrel connector, i need to source a bunch of replacement cords to repair them02:15
technomancyI had two of them fail, then I just started wrapping them in electrical tape and that prevented the failure02:17
technomancyI should do that with my reform charger too I guess02:17
swiveli think in my case it's due to the hot environment i've been using them in while i rebuild this desert cabin over the past few years02:18
swiveleverything rubber and plastic gets softened and fails faster it seems02:18
technomancyI used the ones that failed for me in Thailand so yeah that adds up02:18
technomancybut they didn't fail till after I moved back to the states02:19
swivelhmm.. i have noticed that the flexibility of the cord is changed after going through the hot season, like it's baked out some of the oils02:20
swiveleither way it's getting annoying, i'm all out of spares at this point and am using a repaired one, keep forgetting to order either cords or used adapters off ebay02:21
technomancytry electrical tape maybe02:22
technomancykeeps the cable right around the barrel from bending as much02:22
ex-parrotI’ve got a little cable sitting here which tells a USB-PD charger to start outputting 20v, I just need to solder a reform compatible plug 02:49
- chartreuse (QUIT: Ping timeout: 240 seconds) (~chartreus@S0106f0f249dfd9c3.cg.shawcable.net)03:00
+ chartreuse (~chartreus@S0106f0f249dfd9c3.cg.shawcable.net)03:00
- chartreuse (QUIT: Quit: leaving) (~chartreus@S0106f0f249dfd9c3.cg.shawcable.net)03:17
+ chartreuse (~chartreus@S0106f0f249dfd9c3.cg.shawcable.net)03:17
swiveltechnomancy: the problem with electrical tape in 100+F temps is it'll just fall off and leave a gooey mess behind03:43
swivelbut I have encapsulated the whole section with large-ish heatshrink tubing in the past, it works well for strain relief03:43
chartreuseThe heat-shrink width adhesive is also extra stiff if that's what you're going for, though only shrinks 2:1 rather than 3:104:51
swiveli specifically don't want adhesive04:55
ex-parrotWent to dig around for solderable barrel jacks but all I have are RCAs and DINs. What is this useless apocalypse 😂04:57
chartreuseNormally when I change the plug on a charger I just splice two cables together05:05
chartreuseRather than getting a solderable jack05:05
chartreuseJust go through my box of spare AC adapters find one that fits, find one that's the right voltage and make a cable05:05
- chartreuse (QUIT: Quit: Reconnecting) (~chartreus@S0106f0f249dfd9c3.cg.shawcable.net)05:05
+ chartreuse (~chartreus@S0106f0f249dfd9c3.cg.shawcable.net)05:06
ex-parrotI could just do that 05:25
ex-parrotI’m sure I have some solderable jacks though annoyingly 05:25
- chartreuse (QUIT: Ping timeout: 240 seconds) (~chartreus@S0106f0f249dfd9c3.cg.shawcable.net)10:56
+ chartreuse (~chartreus@S0106f0f249dfd9c3.cg.shawcable.net)10:56
+ rasmus (~rasmus@c80-217-132-63.bredband.tele2.se)12:33
+ andreas-e (~Andreas@2001:861:3108:f570:8c86:6bb4:5689:4fc2)14:14
- rasmus (PART: Disconnected: timeout during receiving) (~rasmus@c80-217-132-63.bredband.tele2.se)15:50
+ rasmus (~rasmus@c80-217-132-63.bredband.tele2.se)15:51
+ mjw (~mark@herd.wildebeest.org)16:26
bluerisemntmn: I wonder if I should try LCDIF instead16:29
blueriseyes yes I know, DCSS is better etc etc16:29
mntmnbluerise: yeah try it16:33
mntmnshould be theoretically simpler16:33
mntmnand it has more status regs16:34
- mjw (QUIT: Ping timeout: 268 seconds) (~mark@herd.wildebeest.org)17:02
- andreas-e (QUIT: Quit: Leaving) (~Andreas@2001:861:3108:f570:8c86:6bb4:5689:4fc2)17:29
+ mjw (~mark@herd.wildebeest.org)17:50
- rasmus (PART: Disconnected: timeout during receiving) (~rasmus@c80-217-132-63.bredband.tele2.se)17:51
+ rasmus (~rasmus@c80-217-132-63.bredband.tele2.se)17:52
bluerisehm17:54
bluerisemntmn: doesn't seem to be any better17:54
blueriseblack, all black17:54
mntmnbluerise: if you use LCDIF i think you need inverted vsync/hsync polarity or something?17:55
mntmnalso lcdif has status registers for the current scanout position if i remember... or at least fifo fill status17:55
bluerisethe mipi dsi driver for imx8mq already does that vsync/hsync inversion18:03
bluerisefor !dcss18:03
blueriseboth FIFOs are empty18:16
bluerisemaybe it's the MIPI-DSI18:46
- erlehmann (QUIT: Ping timeout: 248 seconds) (~erle@dynamic-046-114-033-018.46.114.pool.telefonica.de)19:05
- TadeusTaD (QUIT: Remote host closed the connection) (tadeustad@fulu.psifactor.pl)19:07
+ TadeusTaD (tadeustad@psifactor.pl)19:11
+ erlehmann (~erle@dynamic-046-114-033-161.46.114.pool.telefonica.de)19:19
mntmnbluerise: both fifos are empty?19:21
mntmnbluerise: you mean lcdif fifos?19:21
- rasmus (PART: Disconnected: timeout during receiving) (~rasmus@c80-217-132-63.bredband.tele2.se)19:52
+ rasmus (~rasmus@c80-217-132-63.bredband.tele2.se)19:53
scopsIt seems that i could recover all the batteries with the nitecore sc4 :) 20:05
mntmnscops: awesome!20:28
- rasmus (PART: Disconnected: closed) (~rasmus@c80-217-132-63.bredband.tele2.se)20:39
+ rasmus (~rasmus@c80-217-132-63.bredband.tele2.se)20:40
bluerisemntmn: yup20:48
- rasmus (PART: Disconnected: closed) (~rasmus@c80-217-132-63.bredband.tele2.se)21:10
+ rasmus (~rasmus@c80-217-132-63.bredband.tele2.se)21:12
- rasmus (PART: Disconnected: closed) (~rasmus@c80-217-132-63.bredband.tele2.se)21:37

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!