Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust upload connections #186

Closed
markmetroit opened this issue Sep 22, 2020 · 8 comments
Closed

Adjust upload connections #186

markmetroit opened this issue Sep 22, 2020 · 8 comments

Comments

@markmetroit
Copy link

Hi, is it possible to have an edited file to enable me to max out the bandwidth on a 100mb/s connection? Server has 1gb/s link so it should cope

@JonathanTreffler
Copy link
Collaborator

JonathanTreffler commented Sep 27, 2020

Yes, but you will have to recompile the App.

You can edit the Flow.js paramteres in the your_nextclouds_app_folder/flowupload/src/App.vue file

After that you will have to run

npm ci
npm run build

in the flowupload folder.

The config parameters you want to set are:

chunkSize The size in bytes of each uploaded chunk of data. This can be a number or a function. If a function, it will be passed a FlowFile. The last uploaded chunk will be at least this size and up to two the size, see Issue #51 for details and reasons. (Default: 110241024, 1MB)

simultaneousUploads Number of simultaneous uploads (Default: 3)

More configuration options can be found in the Flow.js documentation

Increasing the uploadspeed

If you increase the simultaneousUploads and chunkSize the upload speed will increase.

Decreasing the uploadspeed

If you decrease these parameters the upload speed will decrease.
NOTE: Decreasing the chunkSize might increase the CPU usage)

@markmetroit
Copy link
Author

Hi Jonathan

I edited the file, the default was set to 4, but there isnt a chunk* setting for 1024*
I tried a npm run build all the same but seems I have to have other things installed as it errored with:

[root@2a57056 src]# npm run build

[email protected] build /data/sites/sftp/apps/flowupload
NODE_ENV=production webpack --progress --hide-modules --config webpack.prod.js

sh: webpack: command not found

npm ERR! Linux 3.10.0-1062.4.3.el7.x86_64

@JonathanTreffler
Copy link
Collaborator

Sorry. I updated the manual. I forgot the npm ci before build.

@markmetroit
Copy link
Author

I think I have no choice but to wait until you get to code a new version as it doenst work for me. what am I doing wrong?

I still cannoot find chunkSize variable and if I try to just change simul uploads from default 4 to 5 then recompile as a test.

[root@2a57056 src]# npm ci

Usage: npm

where is one of:
access, adduser, bin, bugs, c, cache, completion, config,
ddp, dedupe, deprecate, dist-tag, docs, edit, explore, get,
help, help-search, i, init, install, install-test, it, link,
list, ln, login, logout, ls, outdated, owner, pack, ping,
prefix, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, tag, team, test, tst, un, uninstall,
unpublish, unstar, up, update, v, version, view, whoami

npm -h quick help on
npm -l display full usage info
npm help search for help on
npm help npm involved overview

Specify configs in the ini-formatted file:
/root/.npmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config

[email protected] /usr/lib/node_modules/npm

@JonathanTreffler
Copy link
Collaborator

JonathanTreffler commented Sep 29, 2020

You need to update npm. You are currently using Version 3.10.10 and the current version is 6.14.8.

If you don't want to update just use the npm install command instead. Its not exactly the same as ci, but it will work.

@markmetroit
Copy link
Author

Hi, there still isnt a chunkSize variable, removed npm/nodejs and installed v10
Now I get the following

[root@2a57056 flowupload]# npm run build

[email protected] build /PATH EDITED/apps/flowupload
NODE_ENV=production webpack --progress --hide-modules --config webpack.prod.js

10% building 0/1 modules 1 active ...abel-loader/lib/index.js!/PATH EDITED/apps/flowupload/src/main.jsBrowserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Hash: 309716a827d6d72153cc
Version: webpack 4.43.0
Time: 7798ms
Built at: 09/29/2020 9:49:45 AM
Asset Size Chunks Chunk Names
flowupload.js 888 KiB 0 [emitted] [big] main
flowupload.js.map 2.48 MiB 0 [emitted] [dev] main
Entrypoint main [big] = flowupload.js flowupload.js.map

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
flowupload.js (888 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (888 KiB)
flowupload.js

WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

ERROR in No configuration provided for /PATH EDITED/apps/flowupload/css/style.scss
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: NODE_ENV=production webpack --progress --hide-modules --config webpack.prod.js
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-09-29T09_49_45_090Z-debug.log
[root@2a57056 flowupload]#

@JonathanTreffler
Copy link
Collaborator

Thats weird. I have never seen this error

@markmetroit
Copy link
Author

Hi Jonathan, I have emailed you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants