LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 01-07-2008, 02:28 PM   #1
hedpe
Member
 
Registered: Jan 2005
Location: Pittsburgh
Distribution: Ubuntu
Posts: 378

Rep: Reputation: 30
saving files on local disk in VIM/EMACS taking 5+ seconds


Hi all,

I am not sure what happened, but all of the sudden saving files to a local disk in VIM/EMACS is taking around 5 or more seconds. It's extremely frustrating for obvious reasons

I am not sure how to begin debugging this, it seems as though my disk performance is ok:
Code:
gnychis@cyprus:~$ sudo hdparm -t -T /dev/sda1

/dev/sda1:
 Timing cached reads:   2036 MB in  2.00 seconds = 1018.07 MB/sec
 Timing buffered disk reads:  164 MB in  3.00 seconds =  54.61 MB/sec
What else can I check out?

Thanks!
George
 
Old 01-07-2008, 02:58 PM   #2
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
All files? Particular files? How big are the files in question?
 
Old 01-07-2008, 03:02 PM   #3
hedpe
Member
 
Registered: Jan 2005
Location: Pittsburgh
Distribution: Ubuntu
Posts: 378

Original Poster
Rep: Reputation: 30
i only notice this in text editors, not while trying to save a file from the web or something but that's hard to determine because of network transfer time

to give you an idea, i open up vim, create a brand new file, type the letter 't' and hit save and it takes 5 seconds. That's like 5 seconds to save a 1 byte file.
 
Old 01-07-2008, 03:44 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
The only debugging suggestion I can make is to strace the process ...


Cheers,
Tink
 
Old 01-08-2008, 12:07 AM   #5
hedpe
Member
 
Registered: Jan 2005
Location: Pittsburgh
Distribution: Ubuntu
Posts: 378

Original Poster
Rep: Reputation: 30
thanks for the suggestion.

I did:
Code:
$ strace -o slog vim test
and used 'i' to switch to insert mode, then typed a 't', and hit ':wq' to write and quit. It took ~5 seconds to write and exit vim.

Here is the strace:
http://www.andrew.cmu.edu/user/gnychis/slog
 
Old 01-08-2008, 03:10 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Sorry, but could you do that again with the -r -f switches?


Cheers,
Tink
 
Old 01-08-2008, 11:30 AM   #7
hedpe
Member
 
Registered: Jan 2005
Location: Pittsburgh
Distribution: Ubuntu
Posts: 378

Original Poster
Rep: Reputation: 30
done, refresh
 
Old 01-08-2008, 11:50 AM   #8
hedpe
Member
 
Registered: Jan 2005
Location: Pittsburgh
Distribution: Ubuntu
Posts: 378

Original Poster
Rep: Reputation: 30
oh, I also added timestamps, it seems as though an fsync is taking slightly more than 3 seconds

Last edited by hedpe; 01-08-2008 at 12:12 PM.
 
Old 01-08-2008, 03:09 PM   #9
hedpe
Member
 
Registered: Jan 2005
Location: Pittsburgh
Distribution: Ubuntu
Posts: 378

Original Poster
Rep: Reputation: 30
solved, LPD was causing the hang
 
Old 01-08-2008, 05:19 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Wow ... how did you determine that? I wouldn't have thought it would be involved
in this process at all ....


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ruby with emacs] taking user input lilili Programming 2 01-18-2007 01:17 PM
Saving Macros in vim alexisb Linux - Software 2 01-12-2006 07:50 PM
Users saving but not taking ownership deadtech Other *NIX 4 12-06-2005 11:49 AM
regarding colors in vim and emacs pranith Linux - Newbie 0 02-10-2005 04:10 AM
Taking .txt files from Linux to Windows NT on Floppy Disk???? rnk103 Linux - General 1 09-18-2003 07:43 AM


All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration