Berkeley CSUA MOTD:Entry 48628
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/08 [General] UID:1000 Activity:popular
7/8     

2007/11/13-21 [Computer/Networking] UID:48628 Activity:low
11/13   If I have a application on machine foo sending data really fast to
        an application on machine bar via TCP, and the bar applications job
        is write that to disk as fast as possible, what happens if the
        network stream is faster than the disk writes?
        \_ Look up the differences between TCP/IP flow control and
           congestion control. The answer is in front of you.
           http://en.wikipedia.org/wiki/Flow_control
           http://web.mit.edu/~6.033/www/papers/Networks-5-FlowCongestion.pdf
           By the way I hope we're not doing your EE122 homework.
        \_ bar starts blocking on i/o and the requests will queue up.
           Eventually the disk queue will fill up and how bar handles this
           depends on the o/s.
           \_ Basically all the backlog ends up in the memory of bar, right?
            \_ It depends on 100's of things.  Is this a single threaded
               "read, write, repeat" application?  If so your tcp buffers
               on bar will eventually fill up, yes.  How exactly depends on
               the os you are using.  Once that happens it will stop acking
               packets and that means your buffers on foo will start to
               fill up.  Once the buffers on foo fill up (once again how/when
               is going to depend on the os) your app on foo will probably
               start blocking or returning an error because it would block.
               Guess what, all that sort of behavior is also os dependant.
           \_ Does send() start returning errors?  Thx.  -- !OP
            \_ Depends on how you set up your socket.  It will probably
               block instead.
               \_ Your socket will either block until it can send the data
                  or the send() will return errors, usually of either
                  EWOULDBLOCK or ENOMEM. -ERic
           \_ I know syslog is udp, but how does syslogd handle a scenario
              like this?
              \_ dropped logs.  Such is the nature of using udp... -ERic
               \_ And it's intentional.  When everything is going to hell
                  you don't want your syslogs adding to that hell by
                  forcing resends of tons of packets.  Syslog needs to
                  fail without taking down the rest of the system.
        \_ You really need to read Stevens.  This stuff will be 100x clearer
           then.
           \_ I agree, though a word of warning about Stevens.  It is (well,
              they are) an excellent foundation text(s), but it will steer you
              wrong if you're trying to write servers that can serve thousands
              of javascript blocks embedding images and videos to social
              networks like the market leader http://Slide.com, you can't use select.
              The most common alternative I've seen is to use non-blocking
              sockets, and poll them manually.  And, yes, I know that CS 162
              teaches you that polling is bad.  The class lies. -dans
              wrong if you're trying to write servers that can scale to
              handle thousands of connections, you can't use select.  The most
              common alternative I've seen is to use non-blocking sockets, and
              poll them manually.  And, yes, I know that CS 162 teaches you
              that polling is bad.  The class lies. -dans
              \_ Well, in the common case polling is bad.  Occasionally it's
                 the right thing to do.  No undergrad class is going to be
                 able to cover such a broad subject completely. -jrleek
                 \_ I agree it's a broad subject, but I disagree with teaching
                    ideas that are theoretically sound, but break down in
                    practice.  Indeed, poll vs. select is subtle and probably
                    not something that needs be convered in CS 162, but I am,
                    nonetheless frustrated at the range of crippled products I
                    keep seeing because so many people just copy paste the
                    select loop from Stevens.  I find it more appalling that
                    we encourage undergrads to use threads since a) most
                    people can't write working threaded code and b) the
                    performance hit for more than n threads is appalling
                    (typically n is 8, but it depends on your hardware). -dans
                    \- (the collective you) may want to look at the papers by
                       Gaurav Banga and Jeffrey Mogul and various coauthors
                       for a good low level discussion about select/poll.
                       influential papers. --psb
                       if you are not familar with kqueues, the kqueue paper
                       is also good. influential papers. --psb
                       \_ Thanks, I'll check those out.  A lot of my thinking
                          on network performance is shaped by periodic
                          conversations with a handful of senior Cisco
                          engineers who keep leaving Cisco to found companies
                          and keep ending up back there because Cisco keeps
                          buying their companies. -dans
                          \_ Kqueues are awesome, and anyone who makes
                             makes recomendations about how to handle 1000s
                             of concurrent sockets but doesn't know about
                             kqueues (or other like implmentations) proves
                             just how usless his advice his.
                             \_ Do you have any Senior Cisco Engineers to
                                back you up?
                          \_ It's consistent with past performance but still
                             kind of amazing you could turn a journal reference
                             into something about you and your cool world of
                             high tech finance.
                             \_ Please take your meds.  Your delusions are
                                getting the better of you. -dans
        \_ oh lay off, dans' obnoxiousness at least makes the motd slightly
           interesting.  we need all the activity we can get, new undergrads
           dont even know what vi is these days.
2025/07/08 [General] UID:1000 Activity:popular
7/8     

You may also be interested in these entries...
2013/8/22-10/28 [Computer/Companies/Yahoo, Industry/SiliconValley] UID:54732 Activity:nil
8/22    http://marketingland.com/yahoo-1-again-not-there-since-early-08-56585
        Y! is back to #1! Marissa, you are SEXY!!!
        \_ how the heck do you only have 225M uniq vis/month when there
           are over 1 billion internet devices out there?
           \_ You think that every single Internet user goes to Y!?
        \_ Tall blonde skinny pasty, not my type at all -former Y!
	...
2013/6/26-8/13 [Computer/Domains, Computer/Networking, Computer/SW/WWW/Browsers] UID:54697 Activity:nil
6/26    This ones for you psb -ausman
        http://25.media.tumblr.com/027fe67c84c2288cc16e9c85db690834/tumblr_mp0ag8DCQI1qzwozco1_1280.jpg
        \- that's pretty good. i wish someone had put the idea to be before i saw
           it on the internet, so see if i'd have put the 9 justices in the same
           boxes. JOHN PAUL STEVENS >> All the sitting justices. --psb
        \- that's pretty good. i wish someone had put the idea to be before i
	...
2012/4/2-6/4 [Computer/SW/Languages/Java, Computer/SW/RevisionControl] UID:54353 Activity:nil
4/02    We use Perforce at work for revision control. It seems to work okay.
        Lately, a lot of the newer developers are saying that Perforce
        sucks and we should switch to Mercurial or Git. I have done some
        searching on the Internet and some others have this opinion. Added
        advantage is that Mercurial and Git are free. However, there would
        be some work to switch for the sysadmins and the developers.
	...
2012/4/26-6/4 [Computer/Networking] UID:54371 Activity:nil
4/26    I see that soda has an ipv6 address but ipv6 traffic from this box
        doesn't actually work (ping6 <DEAD>ipv6.google.com<DEAD>, ping6 http://www.v6.facebook.com
        Is this expected to work?
        \_ Soda doesn't have a real IPv6 address.  The IPv6 addresses you see
           in ifconfig are just link-local addresses; any IPv6-capable machine
           will autogenerate these, whether or not it's connected to an IPv6
	...
2011/11/8-30 [Computer/SW/Security, Computer/SW/OS/Windows] UID:54218 Activity:nil
11/8    ObM$Sucks
        http://technet.microsoft.com/en-us/security/bulletin/ms11-083
        \_ How is this different from the hundreds of other M$ security
           vulnerabilities that people have been finding?
           \_ "The vulnerability could allow remote code execution if an
               attacker sends a continuous flow of specially crafted UDP
	...
2010/11/1-2011/1/13 [Computer/Networking] UID:54002 Activity:nil
11/1    I'm moving from a home in Fremont to another home within the same ZIP
        code in Fremont, and AT&T customer service says I cannot transfer my
        DSL service because DSL is not available at my new home.  Is that BS?
        Are they just trying to push me to subscribe to their more expensive
        U-verse service?  I'm not asking for any lightening-speed connection.
            \_ could be
	...
Cache (2209 bytes)
en.wikipedia.org/wiki/Flow_control
Flow control mechanisms can be classified by whether or not the receiving node sends feedback to the sending node. Flow control is important because it is possible for a sending computer to transmit information at a faster rate than the destination computer can receive and process them. This can happen if the receiving computers have a heavy traffic load in comparison to the sending computer, or if the receiving computer has less processing power than the sending computer. Common RS 232 control lines are RTS (Request To Send)/CTS (Clear To Send) and DSR (Data Set Ready)/DTR (Data Terminal Ready), which is usually referred to as "hardware flow control". XON/XOFF is usually referred to as "software flow control". Hardware flow control typically works by the DTE or master end first raising or asserting its line, such as RTS, which signals the opposite end (the slave end such as a DCE) to begin monitoring its data input line. When ready for data, the slave end will raise its complementary line, CTS in this example, which signals the master to start sending data, and for the master to begin monitoring the slave's data output line. If either end needs to stop the data, it lowers its respective line. For PC-to-modem and similar links, DTR/DSR are raised for the entire modem session (say a dialup internet call), and RTS/CTS are raised for each block of data. edit Open-loop flow control The open-loop flow control mechanism is characterized by having no feedback between the receiver and the transmitter. The allocation of resources must be a "prior reservation" or "hop-to-hop" type. The Open Loop flow control has inherent problems with maximizing the utilization of the ATM network resources. Resource allocation is made at connection setup using a CAC (Connection Admission Control) and this allocation is made using information that is already "old news" during the lifetime of the connection. edit Closed-loop flow control The Closed Loop flow control mechanism is characterized by the ability of the network to report pending network congestion back to the transmitter. This information is then used by the transmitter in various ways to adapt its activity to existing network conditions.
Cache (285 bytes)
Slide.com -> www.slide.com/
com or any website Slide Shows Make a Slide Show Make a Slide Show and tell the world about yourself. Make a Guestbook SkinFlix Download Slide Screensaver Personalize YouTube clips with skins and more. Screensaver Download Slide Screensaver Watch slideshows, videos, hotties, and more.