Does readfile() cost high CPU and memory usage?

Discussion in 'PHP' started by anilinkz, Sep 18, 2008.

  1. #1
    Example, i have one php file which readfile()s remote video files that is about 100MB+.

    and about 10 users are simultaneously accessing this phpfile

    will it cost too much CPU resources?

    let's say about 300+ users.
    will the server crash?
     
    anilinkz, Sep 18, 2008 IP
  2. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #2
    local file is fine, remote will cost alot of bandwidth.
     
    Kaizoku, Sep 18, 2008 IP
  3. anilinkz

    anilinkz Peon

    Messages:
    118
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i have unlimited bandwidth. so bandwidth doesn't matter.

    What if 500+ users are simultaneously using that single file which readfile()s a remote files which is about 100MB+?

    will it take too much load on the server?
     
    anilinkz, Sep 18, 2008 IP
  4. anilinkz

    anilinkz Peon

    Messages:
    118
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    any help here plssss. esp those who own their own servers... or anyone....
     
    anilinkz, Sep 18, 2008 IP
  5. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #5
    Depends what you set in php.ini, how much memory you allow it to consume.
     
    Kaizoku, Sep 18, 2008 IP
  6. nabz245

    nabz245 Well-Known Member

    Messages:
    677
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    110
    #6
    It will use quite a bit of usage. Why not convert it over to SQL?
     
    nabz245, Sep 19, 2008 IP