Git Product home page Git Product logo

Comments (3)

stealth avatar stealth commented on May 24, 2024

Thats perfectly legit if you hammer sshttp with a lot of packets like in media streaming.
The kernel scheduler would dedicate all CPU ressources to it, unless you run
some other computation-intense process on the same core. So thats OK. It should drop to
0% again if no more packets are seen (I guess the streaming works fine). If you have a lot of streams, you could also use -n switch if your pi has multiple cores.

from sshttp.

recrunchi avatar recrunchi commented on May 24, 2024

Thanks, i understand. I was suspecting what you said.

So, my raspberry 2 has 4 cores. About the "-n" switch , where do i put it ? maybe at the end of the following line on /etc/init.d/sshttp ?

DAEMON_ARGS="-S $SSH_PORT -H $HTTP_PORT -L $LISTEN_PORT -U $USER -R $CHROOT -n 4"

Reading your readme.md: "Unless -n 1 is used as switch, sshttpd binds one thread per CPU core, to better exploit the hardware if running on heavily used web servers", i understand that the program actually works with 4 cores if i don't specify the "-n" switch...

thank

from sshttp.

stealth avatar stealth commented on May 24, 2024

Correct. "-n 1" forces single core, even when multiple cores are detected. Omitting -n should start
4 sshttpd's on your pi, and only one sshttpd should run 100% if there is only a single
streaming connection. More connections should be distributed by kernel to the remaining
sshttpd's. If you dont see 4 sshttpd's, something got wrong with the core detection and you
could use "-n 4".

from sshttp.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.