LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 01:28 PM   #1
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

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, 01: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, 02:02 PM   #3
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

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, 02:44 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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


Cheers,
Tink
 
Old 01-07-2008, 11:07 PM   #5
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

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, 02:10 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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


Cheers,
Tink
 
Old 01-08-2008, 10:30 AM   #7
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Original Poster
Rep: Reputation: 30
done, refresh
 
Old 01-08-2008, 10:50 AM   #8
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

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 11:12 AM.
 
Old 01-08-2008, 02:09 PM   #9
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

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

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


Cheers,
Tink
 
  


Reply



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 12:17 PM
Saving Macros in vim alexisb Linux - Software 2 01-12-2006 06:50 PM
Users saving but not taking ownership deadtech Other *NIX 4 12-06-2005 10:49 AM
regarding colors in vim and emacs pranith Linux - Newbie 0 02-10-2005 03:10 AM
Taking .txt files from Linux to Windows NT on Floppy Disk???? rnk103 Linux - General 1 09-18-2003 06:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:10 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
Open Source Consulting | Domain Registration