From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8217 invoked from network); 8 Oct 2007 03:57:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Oct 2007 03:57:44 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 88057 invoked from network); 8 Oct 2007 03:57:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Oct 2007 03:57:37 -0000 Received: (qmail 22249 invoked by alias); 8 Oct 2007 03:57:29 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11957 Received: (qmail 22234 invoked from network); 8 Oct 2007 03:57:29 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Oct 2007 03:57:29 -0000 Received: (qmail 86765 invoked from network); 8 Oct 2007 03:57:29 -0000 Received: from vms048pub.verizon.net (206.46.252.48) by a.mx.sunsite.dk with SMTP; 8 Oct 2007 03:57:22 -0000 Received: from torch.brasslantern.com ([71.116.76.59]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JPK00BSPQZ1DCF7@vms048.mailsrvcs.net> for zsh-users@sunsite.dk; Sun, 07 Oct 2007 22:57:02 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id l983v0WH024362 for ; Sun, 07 Oct 2007 20:57:01 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id l983v0nr024361 for zsh-users@sunsite.dk; Sun, 07 Oct 2007 20:57:00 -0700 Date: Sun, 07 Oct 2007 20:57:00 -0700 From: Bart Schaefer Subject: Re: sluggish prompt In-reply-to: <20071008014647.GD11176@panix.com> To: zsh-users@sunsite.dk Message-id: <071007205700.ZM24360@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20071007045049.GA28877@panix.com> <20071007053638.14299.qmail@smasher.org> <20071007061947.GA6554@panix.com> <20071007063359.30913.qmail@smasher.org> <20071007071256.GA14895@panix.com> <071007100202.ZM23730@torch.brasslantern.com> <20071008014647.GD11176@panix.com> Comments: In reply to Russell Hoover "Re: sluggish prompt" (Oct 7, 9:46pm) On Oct 7, 9:46pm, Russell Hoover wrote: } } On Sun 10/07/07 at 10:02 AM -0700, } Bart Schaefer wrote: } } > [...] Have you looked at the output of "ps" [...] } > to see how much memory your shell is consuming? } } [panix1:~] [v4.3.4] zsh 1003 --> ps up$$ } USER PID %CPU %MEM VSZ RSS TTY STAT STARTED TIME COMMAND } rj 18666 0.1 0.2 800 2608 ttyr0 Ss 6:25PM 0:00.81 zsh-4.3.4 } } Is "0.2" percent of memory usage normal? Not sure how to guage that. The absolute memory use is the RSS column: 2608 KB. That's about the same as my RSS here, on a workstation where I'm the only user. On the other hand, my VSZ (virtual memory size) is 6636 KB compared to your 800 KB, so I don't think you're doing anything unusual. } I log into one of 4 or 5 user hosts. I don't think there's anything } about the busyness of panix that would cause the promt-delay. Well, if you're one of more than 500 users and each of you is consuming 0.2% of the system memory, then *somebody* is going to have to get swapped out -- and that doesn't even consider all the memory that is being occupied by other programs that all those users are running. The longer a process is idle, the more completely it gets swapped out, and the longer it takes to come back. When you say: } Of course, if I'm at the prompt and I hit several times, } there's no delay. If I haven't been to that window, that shell, for } awhile, and the prompt has been there, and I go back to that window } after awhile and hit , there's a delay. That sounds *exactly* like an idle process being swapped out and then taking a short while to swap back in again when it is no longer idle. A shell that's been waiting for an external command to exit is similarly idle and thus also a candidate for swapping. (However, one symptom does not a diagnosis make.) } > If only at startup, then it's not something to worry about. } } It's definitely not just at startup. Wrong context. I meant "If, when you have set -x in your .zshrc, and you see the list of files in your fpath being printed by the nested for-loops, that output does not appear every time, then it's not something to worry about." I was not talking about the 6-10 second delay when I said "only at startup" in that sentence. } I put the print line in .zshrc, closed vim. Back at the prompt I did } } exec zsh -l } } Then I waited 8 seconds. Then the "PRECMD" appeared, and the prompt } immediately appeared on the next line. OK, but that's not all that interesting. What we need to know is, on every *subsquent* prompt, as you go through your normal habitual use of zsh on this system, do you see delays before PRECMD is printed or in between PRECMD and the prompt? } I use 3 startup files. Here are the other 2. zprofile first, then the } .zshenv. Thanks again. Nothing exciting there ... but I went back and looked at your .zshrc file again and noticed this: export MAIL=$HOME/.maildir/ export MAILCHECK=10 Do you have a lot of mail? Is it on an NFS filesystem that might be slow to respond? If you set MAILCHECK to a much larger value, does the delay become less frequent?