DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-12-14 20:57:55

bklynkid
Member
Registered: 2008-09-26
Posts: 22

slow read/write over FTP/samba! - all the sudden

Well, hopefully I haven't yet tried "everything." I am at a complete loss. I boggles the mind! All the sudden my read/writes are horribly SLOW and I don't think I have changed anything so drastically as to deserve this. I'm connected on a gigabit ethernet and I used to upload at ~19MBps not it's a mere 3-4MBps. Now this is happening on built-in FTP server. NAS is set as static IP and always has been.

What is going on. Now, I've tried the following:

- changed ethernet cables around (I'm 99% certain they are good, however, I get same speeds over WiFi so seems the connection isn't the issue)
- used different OS's to access FTP (WindowsXP and OSX 10.5)
- tried defragmenting the hard drive on my computer, though in OSX it shouldn't really matter too much
- removed ffp0.5
- removed slower hard drive from NAS (when i was getting those speeds I know for certain only the faster drive was in my NAS, didn't think it would make a difference)
- reset NAS to factory defaults
- reset router to factory defaults (DD-WRT v24-sp1)


What else can I try?


Thanks in advance!

Offline

 

#2 2008-12-14 22:17:52

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: slow read/write over FTP/samba! - all the sudden

Are the file sizes consistent?

If you transfer a single 2 GB file, you can get 19MB/sec - but if you transfer 200 x 10 MB files, you'll see a significant drop in speed, even though it's the same amount of data.

Offline

 

#3 2008-12-14 22:22:53

bklynkid
Member
Registered: 2008-09-26
Posts: 22

Re: slow read/write over FTP/samba! - all the sudden

No they were (when I was getting 19MB/sec) and are now big 4-9GB files. I see what you're saying but I don't think that's the issue.

Offline

 

#4 2008-12-14 22:53:39

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: slow read/write over FTP/samba! - all the sudden

No - with 4~9GB files, that would not be the cause - however - disk fragmentation could be.

If you have a spare SATA drive, replace one of the drives in the NAS, format the new drive and test.

Offline

 

#5 2008-12-14 22:56:11

bklynkid
Member
Registered: 2008-09-26
Posts: 22

Re: slow read/write over FTP/samba! - all the sudden

Yes I was thinking the same thing, however when I looked into it it seems that ext2 fs doesn't really need to be defragmented. If it is indeed fragmented, what can I really do about it?

I'll try to copy all the content from my 2nd drive over and format later today just to make sure.

Offline

 

#6 2008-12-15 02:49:21

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: slow read/write over FTP/samba! - all the sudden

That's actually a fallacy, and I know that I'll probably get flamed for saying that.

Perhaps a better way to put it is to say that because of the way ext2 reserves space, fragmentation is less likely to be a problem, but, fragmentation can occur and when it does, throughput takes a significant hit.

Perhaps, because of the larger community's position that ext2 file system doesn't really need to be defragmented, the necessary tools to perform the task have been neglected - I believe there used to be a utility called defrag which appears to no longer be available and may never have been compiled for these processors, so the only option would be to copy the files off the disk, format it and copy them back - and if by doing that you see the performance return to what it previously was, then you'll know whether or not fragmentation was indeed the problem.

Offline

 

#7 2008-12-15 05:01:59

asluiter
Member
From: Melbourne, Australia
Registered: 2008-11-08
Posts: 9

Re: slow read/write over FTP/samba! - all the sudden

I had a similar problem with slow response across the SMB links, yet ssh etc were fine. I tracked the problem down to file system errors on the HDDs. Some files were unaccessible via SMB.

I followed the instructions at http://www.inreto.de/dns323/fsck/ and this resolved the problem.

Other things to check - free space on the disks - if they are full you will get problems, and free memory.

Offline

 

#8 2008-12-15 19:40:32

jcard
Member
From: Portugal
Registered: 2008-09-21
Posts: 289

Re: slow read/write over FTP/samba! - all the sudden

>That's actually a fallacy, and I know that I'll probably get flamed for saying that.

That's indeed a fallacy, and the following report demystify it:

http://www.heise-online.co.uk/open/Tuni … s/110398/3

The problem gets worse when there is a mix of many large and small files in the filesystem, for exemple when using bittorent clients.
I saw my disk throughput more than halved because of this, until I created a partition only for BT downloads.

The "filefrag" program, when applied to large files, shows you how severely fragmented your files are.
For example, on a file with 840MB and 14264 extents, disk throughput is about 12MB/s, while on a file with 734MB and only 6 extents it is about 24.4 MB/s (as measured by dividing the file lenght by the seconds reported by the command "time dd if=<your_file> of=/dev/null").

The only cure is to backup everything, delete everything from the root directory (or reformat), and restore from the backup.

Joao

Last edited by jcard (2008-12-16 01:59:35)


Please consider discussing Alt-F at http://groups.google.com/group/alt-f/topics
Please consider filling Alt-F bugs at http://code.google.com/p/alt-f/issues/list

Offline

 

#9 2008-12-15 20:19:13

bklynkid
Member
Registered: 2008-09-26
Posts: 22

Re: slow read/write over FTP/samba! - all the sudden

There's some good, sound discussion going on here. Thank you all.

I have been downloading lots of usenet stuff, meaning lots of little parts being put together into a file, then verified, repaired and finally extracted in a huge blob (4-9GB). So is it safe to assume that that's what killed my drive? I have no problem getting another 1TB drive backing things up and starting over but when I do, how should I approach the problem? If I have 2x1TB, is it enough to partition the same drive that I download and extract to and where I finally end up storing the thing or should I use the 2nd drive as a sort of scratch partition?

So out of my 1TB drive that I currently have, if I make a partition of say.. 200GB to downloading, extracting, etc of my downloads and then moving the fully downloaded blob onto the other 800GB partition for storage, will that prevent this from happening again?

However, I just tried filefrag on a file that just last week I transferred at a slow rate. Here's what I got:
<a_9GB_file>.mkv: 54 extents found, perfection would be 57 extents

That doesn't seem to be the full story then.



I tried to do the fsck but it complained about an incompatible linux kernel. Can't I just unmount the disk and then check it using fsck.ext4 that's included with ffp? What would the downside of that be?

Offline

 

#10 2008-12-22 21:50:56

bklynkid
Member
Registered: 2008-09-26
Posts: 22

Re: slow read/write over FTP/samba! - all the sudden

Hey guys, I haven't yet had time to reformat the 2nd drive but I found out about the read test using hdparm and I'm wondering if someone could comment on them.

Code:

root@DNS-321:/# hdparm -tT /dev/sdb2

/dev/sdb2:
Timing buffer-cache reads:   148 MB in 0.51 seconds = 293813 kB/s
Timing buffered disk reads:   66 MB in 3.00 seconds = 22524 kB/s

Are these bad? Good? Decent?

Offline

 

#11 2009-02-14 08:45:09

dP21
Member
Registered: 2008-11-29
Posts: 33

Re: slow read/write over FTP/samba! - all the sudden

I'm having the same problem.  Had ~19MB/s with jumbo frames on Gigabit ethernet and now down to ~4MB/s.

Any solutions to this?

Offline

 

#12 2009-02-14 15:41:13

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: slow read/write over FTP/samba! - all the sudden

Have you tried any of the suggestions in the thread?  Did any of them work for you?

Offline

 

#13 2009-02-14 19:32:26

dP21
Member
Registered: 2008-11-29
Posts: 33

Re: slow read/write over FTP/samba! - all the sudden

So far I've tried fsck and it fixed the errors it found.

I only have used 26% of the drive, with files of varying sizes.  However My Documents (primarily word docs and pictures) takes up about 25GB with 20,000 files.  Does this constitute a 'small' file which is adversely affecting performance?

Offline

 

#14 2009-03-02 13:21:16

Iznakurnog
Member
Registered: 2008-12-29
Posts: 12

Re: slow read/write over FTP/samba! - all the sudden

Aren't there any utilites for defragmenting filesystem in DNS323 indeed ? I have this nasty fragmentation problem too .... I can copy just downloaded content from torrents folder to PC at rate no more than 4 Mb/s .... (I use transmission 1.5 client) But when I have it copied and dump back to same place ... Coping speed become excellent .... well 19 Mb/s and up to 30 with jumbo frames turned on. My method is effective but very time consuming. for instance it takes as much as  7 Hours to "cure" 80 Gb torrent (6h to copy from and one to dump back)
So some utility is a must for the device .... I'm absolutely newbie in linux and started with gusto but now feel some disappointing sad

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB