mirror of
https://github.com/asapach/peerflix-server.git
synced 2026-04-25 14:45:50 +03:00
[GH-ISSUE #63] [Info] peerflix storage ? #267
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yas9999 on GitHub (Feb 27, 2016).
Original GitHub issue: https://github.com/asapach/peerflix-server/issues/63
Hello,
i just wonder what peerflix use to store & stream files ?
it's RAM or HDD ?
there is any option to edit this part ? i mean change the way that peerflix use to serve files 👍
Best regards
@asapach commented on GitHub (Feb 27, 2016):
By default the files are stored under
/tmp/torrent-stream(or similar TEMP folder if you're on windows). You can change it by adding~/.config/peerflix-server/config.jsonfile and specifyingtmpoption, e.g.{ "tmp": "/your/folder/here" }If you're on linux and have lots of RAM you can try mounting a tmpfs partition as your storage.
@yas9999 commented on GitHub (Feb 28, 2016):
Hello thanks for information :D,
i'm under ubuntu 14.04 64bits with 2GB RAM !
but i want to use peerflix for huge traffic change, i guess RAM will not be a good choice ?
Regards,
@asapach commented on GitHub (Feb 28, 2016):
Yes, you're better off using an SSD.
@yas9999 commented on GitHub (Mar 27, 2016):
thank you so much, i will try to get a better server with SSD i wonder if i could use peerflix for multiple servers
@yas9999 commented on GitHub (Aug 4, 2016):
Hello @asapach ,

i still have the problem with RAM ! i got a server with 4 GB of RAM & 128 GB SSD
there is any solution to change the way that peerflix store files ?
Best regards
@asapach commented on GitHub (Aug 4, 2016):
What the problem is exactly? I see it's using ~3GB of memory for cache which is to be expected.
@yas9999 commented on GitHub (Aug 4, 2016):
thank you @asapach the problem is i can't add any new torrent even if the old torrents are downloaded,
do you thing i need to change something in my cache ?
there is any option to store in SSD instead of RAM (because you said before : you're better off using an SSD )
Best regards
@asapach commented on GitHub (Aug 4, 2016):
What your
config.json?@yas9999 commented on GitHub (Aug 4, 2016):
there is no config.json inside ~/.config/peerflix-server/
there is only torrents.json
@yas9999 commented on GitHub (Aug 5, 2016):
i used the same option in config.json& this is what i get :
$ peerflix-server
info - socket.io started
(node:6153) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
undefined:2
connections: 100, // Max amount of peers to be connected to.
^
SyntaxError: Unexpected token c in JSON at position 6
at Object.parse (native)
at /usr/lib/node_modules/peerflix-server/server/store.js:93:22
at FSReqWrap.readFileAfterClose as oncomplete
@asapach commented on GitHub (Aug 5, 2016):
The error says your config is invalid JSON. You need to put quotes around the attributes like in this example: https://github.com/asapach/peerflix-server#configuration. And it doesn't support comments
What do you mean when you say:
@yas9999 commented on GitHub (Aug 5, 2016):
yeah i mean that RAM still used even if the torrent is downloaded 100%, i had only 120 Mb free of RAM, so i can't add any new torrent.
i changed my config.json to:
{
"connections": 100,
"uploads": 10,
"path": "/var/www/html/tdown",
"verify": true,
"dht": true,
}
& i got this error:
$ peerflix-server info - socket.io started
(node:16364) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
undefined:8
}
^
SyntaxError: Unexpected token } in JSON at position 156
at Object.parse (native)
at /usr/lib/node_modules/peerflix-server/server/store.js:93:22
at FSReqWrap.readFileAfterClose as oncomplete
@asapach commented on GitHub (Aug 5, 2016):
You've got a trailing comma after "dht": true
On Aug 5, 2016 3:03 PM, "yas9999" notifications@github.com wrote:
@yas9999 commented on GitHub (Aug 5, 2016):
Thank you so much bro, so this will solve my problem ? i mean peerflix will use my hard drive instead of RAM ?
@asapach commented on GitHub (Aug 5, 2016):
It uses as much ram as it needs, but all the files are stored on the hard
drive.
On Aug 5, 2016 9:38 PM, "yas9999" notifications@github.com wrote:
@yas9999 commented on GitHub (Aug 5, 2016):
thanks 😄 so there is no solution to ignore RAM & stream by using HD or my server network like streaming files
@asapach commented on GitHub (Aug 5, 2016):
Torrents can be memory-hungry, especially when you stream them. The more ram you have the better.
@yas9999 commented on GitHub (Aug 5, 2016):
yeah, i don't know how much RAM i need because i like to share the use of peerflix with users i guess for 700-1000 maybe 32 GB of RAM will be perfect ....
i was using transmission but i thing this is the fast way to get files
Thank you so much bro
@yas9999 commented on GitHub (Aug 6, 2016):
@asapach there is any possibility to control file size?
@asapach commented on GitHub (Aug 6, 2016):
What do you mean? The file size is determined by the torrents you download.
6 авг. 2016 г. 1:37 PM пользователь "yas9999" notifications@github.com
написал:
@yas9999 commented on GitHub (Aug 6, 2016):
for example : max file size allowed is 1000 MB, in case if the torrent is bigger than 1000 MB it won't be downloaded !
as there is no option to avoid RAM use i can limit users & get more RAM by time !
as the service will be free users will increase & i need to add more RAM, so limit users per file size will be my solution at this time
@Porco-Rosso commented on GitHub (Aug 6, 2016):
By default peerflix downloads torrents to disk (HDD/SDD). The RAM is only used during the torrenting & streaming process, and should easily support several hundred torrents with only a few GBs of RAM. I can't imagine RAM being your bottleneck until you are serving to 50+users
The only way the torrents are being saved to RAM is if you set up some sort of RAMDisk soultion such as https://www.jamescoyle.net/how-to/943-create-a-ram-disk-in-linux
@asapach commented on GitHub (Aug 6, 2016):
@yas9999, if you want this functionality, you will have to add it yourself. For example here you can inspect the total size of all the files in the torrent (
file.length) and destroy the torrent if it exceeds your limit.@yas9999 commented on GitHub (Aug 6, 2016):
@Porco-Rosso yes you have right i'll serve more than 500 users :/
thank you @asapach i will try to add i guess this is the best solution for me at the moment 😄
regards,