Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!usenetcore.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.030 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'heavily': 0.04; 'cache': 0.05; 'socket': 0.07; 'cc:addr:python-list': 0.09; 'attachment.': 0.09; 'caching,': 0.09; 'output': 0.13; 'weird': 0.15; '23,': 0.16; 'delay,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'seconds.': 0.16; 'stuff,': 0.16; 'wrote:': 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'problem:': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'sort': 0.25; 'message-id:@mail.gmail.com': 0.27; 'disk': 0.27; 'then.': 0.27; 'occasionally': 0.29; 'system,': 0.30; "i'd": 0.31; 'seconds': 0.31; 'certain': 0.31; 'included': 0.32; 'interaction': 0.33; 'safely': 0.33; 'open': 0.33; 'file': 0.34; 'running': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'clear': 0.35; 'subject:time': 0.35; 'something': 0.35; 'remote': 0.35; 'but': 0.36; 'there': 0.36; 'subject:: ': 0.37; 'anything': 0.38; 'data': 0.39; 'takes': 0.39; 'some': 0.40; 'waiting': 0.60; 'your': 0.60; 'skip:n 10': 0.62; 'between': 0.65; 'six': 0.65; 'pin': 0.66; 'blowing': 0.84; 'bottle': 0.84; 'cecil': 0.84; 'chrisa': 0.84; 'delaying': 0.84; 'terrible': 0.84; 'timings': 0.84; 'westerhof': 0.84; 'to:none': 0.91; 'lot,': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=IAckRCO9vSEVauHh2hXk5MbFNzalO733vbgajA7otn0=; b=Ydkxm6ZzSM5OUB+8wBapgdmbPZmQ/3rNeeZUvh6ys5nj9DMCk2IoGEbbrjslKGVkSF FdlUhNG4bYKt0r4HSG+i50rZ99eV37DyZq6RFgxM4cuxFOR/lURSMEpaBAjlPDoXJ9fT nJFSEYZCJMvq8oTOYeKJTyR44hKN5+dW4fe97wmRVuuyQA6yqEzLuwfArkOv74ywONE2 1JNB9V+RdQ+OoV8iLQkJVbQYx0cv0fn9BVZplUuSFasX3oLNDSIpSMywVzqpD0AtE7Dq DPXbOTWLCSyHFn6BhrgyqNHVa2e3nUmZsQaJiyXRRNpq5mLojuh4sCuPl+akFyvbCBbh lTaQ== MIME-Version: 1.0 X-Received: by 10.107.3.149 with SMTP id e21mr12456533ioi.19.1440285195075; Sat, 22 Aug 2015 16:13:15 -0700 (PDT) In-Reply-To: <87lhd3m3t0.fsf@Equus.decebal.nl> References: <87si7cnxq6.fsf@Equus.decebal.nl> <87a8tjo8oz.fsf@Equus.decebal.nl> <87pp2fmc9z.fsf@Equus.decebal.nl> <87lhd3m3t0.fsf@Equus.decebal.nl> Date: Sun, 23 Aug 2015 09:13:14 +1000 Subject: Re: Sometimes bottle takes a lot of time From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1440285202 news.xs4all.nl 23812 [2001:888:2000:d::a6]:54317 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95568 On Sun, Aug 23, 2015 at 7:06 AM, Cecil Westerhof wrote: > I have included the output as attachment. It is clear that bottle is > not the problem: fetching all the data takes at most 0.017 seconds. > Something to consider: You could be running into some weird interaction of caches. Try blowing your OS and browser caches, and see what the timings are like then. Also, if you can recreate the six-second delay, I'd want to know what's happening during that time - is there an open socket between the browser and the server? Is anything pegging the CPU? Is the disk heavily active? Finding any sort of saturation would help to pin down the cause of the delay. Do you have any network mounts in your file system, and could they be delaying some stat() call somewhere? Six seconds is a lot, but I do recall running into problems occasionally when I had a NETBIOS/NETBEUI mount on one of my boxes (Linux couldn't safely cache stuff, and the remote system was misconfigured as regards caching, I think - the upshot was terrible performance in certain situations, all of it spent waiting on the network). ChrisA