Speed Of Multi Threaded Non Socket Application

by 10 replies
12
If I had an application that was a content generator and was generating millions of pages for 1000 websites lets say. If I were to make it multi threaded would it be any faster. The reason Im asking is because an application that connects to the internet with many threads would be faster because many threads are established and then many TCP/IP requests are sent and received. If there was only one thread then there is a wait time for a request to come back. In this time other requests could be sent and/or handled. But in an application that is all local is there any benefit to multi threading.
#programming #application #multi #socket #speed #threaded
  • Nope .. I dont think so ..
    • [1] reply
    • I would think that if the computer you were running it on had multiple cpu cores you would notice an increase in performance.
      • [1] reply
  • No, you'll need some sort of a script running on the server anyway.
    • [ 1 ] Thanks
    • [1] reply
    • Is there any script in php that does not need any special packages installed and does not need shell access.

      Also do most webhosts allow shell access to unpack using a script

      something like

      <?php system('unzip zipFileName.zip'); ?>
      • [1] reply
  • If it's something like whm where you have root access, you can upload something like .tar.gz with proper directory structure and unpack it via ssh with a single command. So technically the server will unpack it but you won't need to install any additional scripts there.
    • [1] reply
    • It should be a on a mutli-core processor over a single core. When only single cores existed multi-threading was nothing but time slicing done by the OS.

      Technically only one thread can run at a time per core.
  • You could use something like rsync to modify one site and have the rsync script push the change to the other servers. Even something like 1 master server serves to X servers that in turn serve another X servers you could balance the load easily.

    Another method would be to use something like github to manage the content and have each server pull the updates from the github server.
    • [ 1 ] Thanks

Next Topics on Trending Feed

  • 12

    If I had an application that was a content generator and was generating millions of pages for 1000 websites lets say. If I were to make it multi threaded would it be any faster. The reason Im asking is because an application that connects to the internet with many threads would be faster because many threads are established and then many TCP/IP requests are sent and received. If there was only one thread then there is a wait time for a request to come back. In this time other requests could be sent and/or handled. But in an application that is all local is there any benefit to multi threading.