0

We have lots of pdf files (100K plus) in our server hard drive which we currently transfer to SFTP server using a java SFTP library. I have two questions here,

  1. I believe moving files from hard drive of a server to remote SFTP is an example of I/O operation?
  2. Is there any way to speed up this process (moving files from hard drive of a server to remote SFTP) by using NodeJS , especially NodeJS streams?.
user3656231
  • 431
  • 2
  • 7
  • 17
  • No. NodeJS is a high level language. If you have a low level I/O performance issue, this is not the language to use to address it. The performance issue might be slow internet. No language will help with this. You just need faster internet – Nick.Mc Aug 30 '20 at 05:46
  • So , you mean that it is not an example of I/O operation. But we are dealing with hard drive to move files from it right?. May be I am confused. – user3656231 Aug 30 '20 at 06:08
  • Yes it is an I/O operation. Using NodeJS is not going to improve it though. – Nick.Mc Aug 30 '20 at 06:11
  • To speed it up you need to work out where the slow part is. It could be 1. The overhead of lots of small files (test by comparing the rate of one large file to many small files that add up to the same size). It could be that you have slow internet (is the copy rate the same as your general internet speed?). It could also be (but unlikely) that your hard drive is too slow or the FTP server is slow to accept data. – Nick.Mc Aug 30 '20 at 06:13
  • Quickly reading the doco on NodeJS streams, these aren't compatible with FTP (which is an ancient protocol). – Nick.Mc Aug 30 '20 at 06:15

0 Answers0