Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^2: Does IO::Select work? Solution

by BrowserUk (Pope)
on Oct 24, 2012 at 20:22 UTC ( #1000707=note: print w/replies, xml ) Need Help??

in reply to Re: Does IO::Select work? Solution
in thread Does IO::Select work? Anywhere?

Is this the mythical Holy Grail select script that you have been looking for?

Not really. Start your server and before you connect anything, check top. 100% cpu when doing nothing isn't nice.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong


Replies are listed 'Best First'.
Re^3: Does IO::Select work? Solution
by zentara (Archbishop) on Oct 25, 2012 at 10:25 UTC
    So that 100% cpu usage, is where you think the kernel needs tweaking? It's an odd 100%, because it dosn't seem to slow down my other processes. Maybe the kernel processing reporting is deceiving, just like the problem with memory gains, where even though ps says memory is being held by a process, the memory gain is just in the swap area, or some technical detail, which isn't real memory.

    Is this 100% cpu usage really 100%? If so, how come all my other apps are still as responsive as ever?

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

      Just change the time-out, probably from 0 to "infinity" (which is likely represented by -1).

      - tye        

        Tye, I didn't think you cared about anything I wrote!. :-) I tried -1 for infinity, and still 100% cpu. But I had the audacity to undefine infinity and it does the right thing. CPU usage is minimal.
        #Change: #my ($new_readable) = IO::Select->select($readable_handles, undef, und +ef, 0 ); # to my ($new_readable) = IO::Select->select($readable_handles, undef, unde +f, undef );
        and the server in Re: Does IO::Select work? Solution is the Holy Grail after all. No needed. :-) Minimum cpu usage.

        I'm not really a human, but I play one on earth.
        Old Perl Programmer Haiku ................... flash japh

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000707]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2018-03-18 00:37 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (228 votes). Check out past polls.