core icon indicating copy to clipboard operation
core copied to clipboard

[QA] write to external SFTP storage is slow

Open jnweiger opened this issue 4 years ago • 2 comments

setup: owncloud core 10.6.0

with

apt-get install pure-ftpd
adduser ftpdata

-> Settings -> Storage SFTP, Username and password Configuration localhost /home/ftpdata

  • A user moves a 200MB file from his primary storage to SFTP using the web UI. System loadavg is 0.01 image
  • strace shows an sshd process with
read(4, "\2432\10\277\0056]\374\237\216\226\362\226w\261\237\24;jS\n\362\345]\21\t\10\253\226\322\36{"..., 16384) = 96
write(11, "\0\0\0(\3\0\0\0\1\0\0\0\27/home/ftpdata/200MB"..., 44) = 44
read(12, "\0\0\0\rf\0\0\0\1\0\0\0\4\0\0\0\0", 16384) = 17
write(4, "Y\247\216\36\16\370#\364%\331\10\0E\31\272\314R\317\220\277W\204\361.[\261\227z\376!\366g"..., 80) = 80
read(4, "\4S\3\320\377\\>\312F\0217\200>\226?\373CQ+!\330\341\351\376\350\353\22\16\303L\364\271"..., 16384) = 8192
read(4, "^\2605\257!R:@\311\364\331\362\1\353\335\221\335\237U\244\36\201\31\224\310c\244p\361\1gy"..., 16384) = 80
write(11, "\0\0 \31\6\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\0\4\332 \0\0\0 \0\266\206\346"..., 8221) = 8221
read(12, "\0\0\0\30e\0\0\0\0\0\0\0\0\0\0\0\7Success\0\0\0\0", 16384) = 28
write(4, "\235\300H\273\341\3314\342s\3\35LL\323\35\25R\337$\361\267\200\256m\247C\25\225\335\263\36\376"..., 80) = 80
read(4, "\346\370T\267\3514\314\245\335\206\241p\344\301\273\17\331F6\303\314\260hY\240\16\234\215\270\276:v"..., 16384) = 80
write(11, "\0\0\0\r\4\0\0\0\1\0\0\0\4\0\0\0\0", 17) = 17
read(12, "\0\0\0\30e\0\0\0\1\0\0\0\0\0\0\0\7Success\0\0\0\0", 16384) = 28
write(4, "\205\345\350z\325\362\372\212\230\21\0107\316\245\201\370\243\237\206Wy\332\333%0R\234 \354\270z\331"..., 80) = 80
read(4, "\252,)u\240\342\1776s0\303\264\275\263\240\311\273&g\t0\243_\24P!N\334\22\21(c"..., 16384) = 96
write(11, "\0\0\0(\3\0\0\0\1\0\0\0\27/home/ftpdata/200MB"..., 44) = 44
read(12, "\0\0\0\rf\0\0\0\1\0\0\0\4\0\0\0\0", 16384) = 17
write(4, "\372Eq\267\"\272A\215\35\377\0\21|\206.\316y\2\16\335O\224\3374\217\220z9\304\316\26l"..., 80) = 80
read(4, "0\333e\2l\311\6\232s\373T\272D4\315\326[A\23 \23\275\179\366\31,\330\2068\330\246"..., 16384) = 8192
read(4, "\207\304#\376\10.\37n\252\353v\22\2610V\233\36\272\320w\354~\213(G\377\213i}a\312\252"..., 16384) = 80
write(11, "\0\0 \31\6\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\0\4\332@\0\0\0 \0B\266\333"..., 8221) = 8221
read(12, "\0\0\0\30e\0\0\0\0\0\0\0\0\0\0\0\7Success\0\0\0\0", 16384) = 28
write(4, "F2\312l\354\177\323\303r\324\0375\2635\316(\24\0377\337\4\326\356\214\371\371)\222X<\vm"..., 80) = 80
read(4, "\270\4\324\252\327\375\310\341\r&\363@D\376\374\5\324wN6\321\336Z(\202\214I\245-\261\21X"..., 16384) = 80
write(11, "\0\0\0\r\4\0\0\0\1\0\0\0\4\0\0\0\0", 17) = 17
read(12, "\0\0\0\30e\0\0\0\1\0\0\0\0\0\0\0\7Success\0\0\0\0", 16384) = 28
write(4, "~\342\301l4\225U?\222%&\240\231\1]\276'(g\266 \22X\246\36\216ZX\342Y\345\0"..., 80) = 80
read(4, "G\363v\222\354\321#\327`S\324d\354\360\252n5/\261\2202\321]P\2S\377\341\26\220\277\361"..., 16384) = 96
write(11, "\0\0\0(\3\0\0\0\1\0\0\0\27/home/ftpdata/200MB"..., 44) = 44
read(12, "\0\0\0\rf\0\0\0\1\0\0\0\4\0\0\0\0", 16384) = 17
write(4, "\222\251\32\377[\3412\235\334\363B\16E`te\tF\260}\303\267\220v\26V\375\203$\204\360\207"..., 80) = 80

80 byte read write system calls are inefficient. BAD.

  • the move finishes after 22 minutes. BAD

Expected behaviour: Do 8192 byte chunks more often. loadavg ca 1.0 and a few seconds max. (A manual sftp "put" into that storage reaches > 100MBytes / sec)

jnweiger avatar Feb 16 '21 23:02 jnweiger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 19 '21 16:09 stale[bot]

This issue has been automatically closed.

stale[bot] avatar Sep 20 '21 19:09 stale[bot]