LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   saving files on local disk in VIM/EMACS taking 5+ seconds (https://www.linuxquestions.org/questions/linux-software-2/saving-files-on-local-disk-in-vim-emacs-taking-5-seconds-611805/)

hedpe 01-07-2008 01:28 PM

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

Poetics 01-07-2008 01:58 PM

All files? Particular files? How big are the files in question?

hedpe 01-07-2008 02:02 PM

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.

Tinkster 01-07-2008 02:44 PM

The only debugging suggestion I can make is to strace the process ...


Cheers,
Tink

hedpe 01-07-2008 11:07 PM

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

Tinkster 01-08-2008 02:10 AM

Sorry, but could you do that again with the -r -f switches?


Cheers,
Tink

hedpe 01-08-2008 10:30 AM

done, refresh :)

hedpe 01-08-2008 10:50 AM

oh, I also added timestamps, it seems as though an fsync is taking slightly more than 3 seconds

hedpe 01-08-2008 02:09 PM

solved, LPD was causing the hang

Tinkster 01-08-2008 04:19 PM

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


Cheers,
Tink


All times are GMT -5. The time now is 01:57 AM.