Number of nfsd threads should be configurable in frontview

For those who cannot wait for the official releases, we'll occasionally post test releases here. This includes the NV+/NV/Duo/1100/1000/X6/600/ models.
WARNING: use at your own risk!

Moderator: chirpa

Similar topics


Number of nfsd threads should be configurable in frontview

Postby XLION » Mon Sep 24, 2007 8:55 am

Hi,

this request is actually the result of performance measurements I've posted in http://www.infrant.com/forum/viewtopic. ... ght=#67517

After doing my "netcat" tests, the final "suspect" for causing heavy fragmentation on the target file has been NFS or rather nfsd. So I've manually edited "/etc/init.d/nfs-kernel-server" and changed the number of nfsd threads (nproc) from 8 to 1 which -- suprise!!! -- resulted in fragmentation of the target file to be gone, i. e. local read speed on the file copied over the net is now 40 MB/s (compared to 27 MB/s before).

Possibly someone at infrant/netgear should analyse why the use of multiple nfsd instances results in such heavy file fragmentation, but for now I would be happy with a configuration option in frontview ...

Cheers,
Axel
Gentoo Linux (Windows on VMware) + ReadyNAS NV+
- IBM ThinkCentre A51P: P4 3GHz, 2.5 GB RAM, 2 x 250 GB Samsung SATA HD, NetXtreme BCM5705_2 Gigabit Ethernet
- IBM/Lenovo Thinkpad R60: Core 2 1.83 GHz, 2 GB RAM, 160 GB Samsung SATA HD, NetXtreme BCM5751M Gigabit Ethernet PCI Express
- LevelOne GSW-0804T Gigabit Switch
- APC SMART UPS 750 XL
- ReadyNAS NV+: 1GB RAM [2.5-3-3-7], 2xSeagate ST3500630NS 500GB + 2xSamsung HD501LJ 500GB, XRAID, RAIDiator 4.00b8-p1-T1 [1.00a037]
- Jumbo Frames disabled, Journaling ON, Full Journaling OFF, NFS over TCP (r/wsize=128K) ==> 47.3 MB/s read, 12.2 MB/s write, RSYNC ==> 5-6 MB/s write
User avatar
XLION
Advanced ReadyNAS Expert
 
Posts: 540
Joined: Sat Aug 04, 2007 1:54 pm
Location: Hannover, Germany

Re: Number of nfsd threads should be configurable in frontvi

Postby bhoar » Mon Sep 24, 2007 9:23 am

Is it possible that the server or client needs to be told to lock each client's single file access to a single server thread?

There are probably some negatives to reducing the the total thread count to 1. There's got to be a config item that balances things out.

-brendan
Unofficial, rambling and sometimes useful comments can be found above. Official, and always useful, links found below.
If you want official support, please use the phone number or phone number link below.
  • Broken Links Removed for now.
  • United States Support: 888-NETGEAR
  • International Support: Phone Numbers
FW: Hey! They're sending us free lumber!
User avatar
bhoar
ReadyNAS Junkie
 
Posts: 3608
Joined: Sun Jun 26, 2005 12:51 pm
Location: Arlington, VA / Washington, D.C.
ReadyNAS: Pro

Re: Number of nfsd threads should be configurable in frontvi

Postby XLION » Mon Sep 24, 2007 9:38 am

bhoar wrote:Is it possible that the server or client needs to be told to lock each client's single file access to a single server thread?

There are probably some negatives to reducing the the total thread count to 1. There's got to be a config item that balances things out.

-brendan

I think that not using more than one process/thread for handling a "single file request" -- as you've suggested -- would solve the problem. I always found it quite strange that multiple instances of nfsd were "competing" over a single file ... (I'm using NFS over TCP, bytheway ...)

I've tried to figure out how nsfd is supposed to split load into multiple processes (per TCP-connection, per file, per block, ...), but I haven't found any details in the NFS documentation. There's just this rather generally statement, i. e. "increase number of instances on servers experiencing heavy load"...

ByTheWay: Limiting nfsd to a single instance also increased read performance over the network, i. e. I'm now getting about 40 MB/s when reading a 1GB file from the ReadyNAS. Though write performance is still not better than 12 MB/s, but this is OK my me ...
Gentoo Linux (Windows on VMware) + ReadyNAS NV+
- IBM ThinkCentre A51P: P4 3GHz, 2.5 GB RAM, 2 x 250 GB Samsung SATA HD, NetXtreme BCM5705_2 Gigabit Ethernet
- IBM/Lenovo Thinkpad R60: Core 2 1.83 GHz, 2 GB RAM, 160 GB Samsung SATA HD, NetXtreme BCM5751M Gigabit Ethernet PCI Express
- LevelOne GSW-0804T Gigabit Switch
- APC SMART UPS 750 XL
- ReadyNAS NV+: 1GB RAM [2.5-3-3-7], 2xSeagate ST3500630NS 500GB + 2xSamsung HD501LJ 500GB, XRAID, RAIDiator 4.00b8-p1-T1 [1.00a037]
- Jumbo Frames disabled, Journaling ON, Full Journaling OFF, NFS over TCP (r/wsize=128K) ==> 47.3 MB/s read, 12.2 MB/s write, RSYNC ==> 5-6 MB/s write
User avatar
XLION
Advanced ReadyNAS Expert
 
Posts: 540
Joined: Sat Aug 04, 2007 1:54 pm
Location: Hannover, Germany

Re: Number of nfsd threads should be configurable in frontvi

Postby bhoar » Mon Sep 24, 2007 10:26 am

Hmm, I'm not sure if this belongs in the Features Request, Beta Release or Performance forum (or all three). It looks like something that could give promising results for NFS users with some simple tweaks on the infrant side.

Perhaps Infrant (Netgear) can comment?

-brendan
Unofficial, rambling and sometimes useful comments can be found above. Official, and always useful, links found below.
If you want official support, please use the phone number or phone number link below.
  • Broken Links Removed for now.
  • United States Support: 888-NETGEAR
  • International Support: Phone Numbers
FW: Hey! They're sending us free lumber!
User avatar
bhoar
ReadyNAS Junkie
 
Posts: 3608
Joined: Sun Jun 26, 2005 12:51 pm
Location: Arlington, VA / Washington, D.C.
ReadyNAS: Pro

Re: Number of nfsd threads should be configurable in frontvi

Postby XLION » Mon Sep 24, 2007 10:54 am

bhoar wrote:Hmm, I'm not sure if this belongs in the Features Request, Beta Release or Performance forum (or all three). It looks like something that could give promising results for NFS users with some simple tweaks on the infrant side.
Whatever ... Considering the entire sequence of copying a large file over the net using NFS (resulting in heavy fragmentation) and then retrieving the very file again over the network, I see a performance boost of 200% (20 MB/s --> 40 MB/s), which is really worth the effort of adding an option to frontview (performance settings), isn't it?
Perhaps Infrant (Netgear) can comment?
Well, I'm having a party anyway ... :-)
Gentoo Linux (Windows on VMware) + ReadyNAS NV+
- IBM ThinkCentre A51P: P4 3GHz, 2.5 GB RAM, 2 x 250 GB Samsung SATA HD, NetXtreme BCM5705_2 Gigabit Ethernet
- IBM/Lenovo Thinkpad R60: Core 2 1.83 GHz, 2 GB RAM, 160 GB Samsung SATA HD, NetXtreme BCM5751M Gigabit Ethernet PCI Express
- LevelOne GSW-0804T Gigabit Switch
- APC SMART UPS 750 XL
- ReadyNAS NV+: 1GB RAM [2.5-3-3-7], 2xSeagate ST3500630NS 500GB + 2xSamsung HD501LJ 500GB, XRAID, RAIDiator 4.00b8-p1-T1 [1.00a037]
- Jumbo Frames disabled, Journaling ON, Full Journaling OFF, NFS over TCP (r/wsize=128K) ==> 47.3 MB/s read, 12.2 MB/s write, RSYNC ==> 5-6 MB/s write
User avatar
XLION
Advanced ReadyNAS Expert
 
Posts: 540
Joined: Sat Aug 04, 2007 1:54 pm
Location: Hannover, Germany

Re: Number of nfsd threads should be configurable in frontvi

Postby bhoar » Mon Sep 24, 2007 11:53 am

XLION wrote:
bhoar wrote:Hmm, I'm not sure if this belongs in the Features Request, Beta Release or Performance forum (or all three). It looks like something that could give promising results for NFS users with some simple tweaks on the infrant side.
Whatever ... Considering the entire sequence of copying a large file over the net using NFS (resulting in heavy fragmentation) and then retrieving the very file again over the network, I see a performance boost of 200% (20 MB/s --> 40 MB/s), which is really worth the effort of adding an option to frontview (performance settings), isn't it?


Er, my point wasn't that the thread should be moved (which I can do), more just an off-hand comment that it didn't fit into a neat category, and also to keep the thread on the Infrant radar by posting to it. :)

Bump!

:)

-brendan
Unofficial, rambling and sometimes useful comments can be found above. Official, and always useful, links found below.
If you want official support, please use the phone number or phone number link below.
  • Broken Links Removed for now.
  • United States Support: 888-NETGEAR
  • International Support: Phone Numbers
FW: Hey! They're sending us free lumber!
User avatar
bhoar
ReadyNAS Junkie
 
Posts: 3608
Joined: Sun Jun 26, 2005 12:51 pm
Location: Arlington, VA / Washington, D.C.
ReadyNAS: Pro

Postby yoh-dah » Mon Sep 24, 2007 12:17 pm

Nice find XLION. We'll do an analysis of this. Thanks!
"Mooner panels -- moonlight-powered solar panels."
Yoh-dah's Useless Invention Ideas

ImageImage
NETGEAR Support | USA: 888-NETGEAR / International Numbers
www.readynas.com | FAQ | Hardware Compatibility List | Testing Memory | Sending Logs | Documentation | Testimonials
User avatar
yoh-dah
Jedi Council
 
Posts: 13218
Joined: Fri Nov 19, 2004 1:21 am
Location: Borah-Borah
ReadyNAS: Pro

Postby XLION » Wed Sep 26, 2007 2:27 pm

I've just noticed that you'll (also) need to modify "/etc/init.d/rc3" to make the change "reboot-resistent". Is "/etc/init.d/nfs-kernel-server" actually used, or rather why does it exist, if it isn't called as a "module" on startup?

ByTheWay: Any news on the analysis of fragmentation caused by multiple nfsd instances?
Gentoo Linux (Windows on VMware) + ReadyNAS NV+
- IBM ThinkCentre A51P: P4 3GHz, 2.5 GB RAM, 2 x 250 GB Samsung SATA HD, NetXtreme BCM5705_2 Gigabit Ethernet
- IBM/Lenovo Thinkpad R60: Core 2 1.83 GHz, 2 GB RAM, 160 GB Samsung SATA HD, NetXtreme BCM5751M Gigabit Ethernet PCI Express
- LevelOne GSW-0804T Gigabit Switch
- APC SMART UPS 750 XL
- ReadyNAS NV+: 1GB RAM [2.5-3-3-7], 2xSeagate ST3500630NS 500GB + 2xSamsung HD501LJ 500GB, XRAID, RAIDiator 4.00b8-p1-T1 [1.00a037]
- Jumbo Frames disabled, Journaling ON, Full Journaling OFF, NFS over TCP (r/wsize=128K) ==> 47.3 MB/s read, 12.2 MB/s write, RSYNC ==> 5-6 MB/s write
User avatar
XLION
Advanced ReadyNAS Expert
 
Posts: 540
Joined: Sat Aug 04, 2007 1:54 pm
Location: Hannover, Germany

Postby XLION » Thu Sep 27, 2007 5:28 pm

I did some more research on the nfs performance/fragmentation issues.

1. The fragmentation problem (when running more than one instance of nfsd) isn't specific to the ReadyNAS. The same thing happens on my linux server (linux 2.6.22, nfs-utils-1.1.0).

2. Bad NFS write performance (to ReadyNAS, less than 50% of local write speed) is specific to the ReadyNAS, i. e. when copying files to my Linux Server, the only limiting factor is local disk speed. For "nfsd" uses more than 90% of cpu time during file transfer, I would guess that cpu speed is the limiting factor on the ReadyNAS ...

3. CIFS write speed is slightly better than NFS write speed (16,5 MB/s instead of 12,5 MB/s). CPU usage (smbd) is around 60% during copy.
Gentoo Linux (Windows on VMware) + ReadyNAS NV+
- IBM ThinkCentre A51P: P4 3GHz, 2.5 GB RAM, 2 x 250 GB Samsung SATA HD, NetXtreme BCM5705_2 Gigabit Ethernet
- IBM/Lenovo Thinkpad R60: Core 2 1.83 GHz, 2 GB RAM, 160 GB Samsung SATA HD, NetXtreme BCM5751M Gigabit Ethernet PCI Express
- LevelOne GSW-0804T Gigabit Switch
- APC SMART UPS 750 XL
- ReadyNAS NV+: 1GB RAM [2.5-3-3-7], 2xSeagate ST3500630NS 500GB + 2xSamsung HD501LJ 500GB, XRAID, RAIDiator 4.00b8-p1-T1 [1.00a037]
- Jumbo Frames disabled, Journaling ON, Full Journaling OFF, NFS over TCP (r/wsize=128K) ==> 47.3 MB/s read, 12.2 MB/s write, RSYNC ==> 5-6 MB/s write
User avatar
XLION
Advanced ReadyNAS Expert
 
Posts: 540
Joined: Sat Aug 04, 2007 1:54 pm
Location: Hannover, Germany

Postby XLION » Sun Oct 07, 2007 2:37 pm

XLION wrote:I've just noticed that you'll (also) need to modify "/etc/init.d/rc3" to make the change "reboot-resistent". Is "/etc/init.d/nfs-kernel-server" actually used, or rather why does it exist, if it isn't called as a "module" on startup?

ByTheWay: Any news on the analysis of fragmentation caused by multiple nfsd instances?
After updating to beta 6 I checked whether the "nfsd instance issue/request" has been worked on. It doesn't seem so.

@yedi council: May I expect that this is addressed before going final?
Gentoo Linux (Windows on VMware) + ReadyNAS NV+
- IBM ThinkCentre A51P: P4 3GHz, 2.5 GB RAM, 2 x 250 GB Samsung SATA HD, NetXtreme BCM5705_2 Gigabit Ethernet
- IBM/Lenovo Thinkpad R60: Core 2 1.83 GHz, 2 GB RAM, 160 GB Samsung SATA HD, NetXtreme BCM5751M Gigabit Ethernet PCI Express
- LevelOne GSW-0804T Gigabit Switch
- APC SMART UPS 750 XL
- ReadyNAS NV+: 1GB RAM [2.5-3-3-7], 2xSeagate ST3500630NS 500GB + 2xSamsung HD501LJ 500GB, XRAID, RAIDiator 4.00b8-p1-T1 [1.00a037]
- Jumbo Frames disabled, Journaling ON, Full Journaling OFF, NFS over TCP (r/wsize=128K) ==> 47.3 MB/s read, 12.2 MB/s write, RSYNC ==> 5-6 MB/s write
User avatar
XLION
Advanced ReadyNAS Expert
 
Posts: 540
Joined: Sat Aug 04, 2007 1:54 pm
Location: Hannover, Germany

Postby yoh-dah » Tue Oct 09, 2007 4:44 pm

Not for 4.0, but for the technically savvy, it's a pretty easy change in the shell anyway. Having multiple nfsd running gives you better performance in a multi-user environment and for the most part, the performance is acceptable in a single-user environment. We may consider adding an option for 4.1, but I'd rather keep things less complicated and less cumbersome for the majority of the folks.
"Mooner panels -- moonlight-powered solar panels."
Yoh-dah's Useless Invention Ideas

ImageImage
NETGEAR Support | USA: 888-NETGEAR / International Numbers
www.readynas.com | FAQ | Hardware Compatibility List | Testing Memory | Sending Logs | Documentation | Testimonials
User avatar
yoh-dah
Jedi Council
 
Posts: 13218
Joined: Fri Nov 19, 2004 1:21 am
Location: Borah-Borah
ReadyNAS: Pro

Postby Skywalker » Tue Oct 09, 2007 4:52 pm

XLION wrote:I've just noticed that you'll (also) need to modify "/etc/init.d/rc3" to make the change "reboot-resistent". Is "/etc/init.d/nfs-kernel-server" actually used, or rather why does it exist, if it isn't called as a "module" on startup?

It is used if the NFS service is stopped or started from Frontview.
User avatar
Skywalker
Jedi Council
 
Posts: 2763
Joined: Fri Nov 19, 2004 10:47 am
Location: Fremont, CA
ReadyNAS: NV

Postby XLION » Tue Oct 09, 2007 5:02 pm

yoh-dah wrote:Not for 4.0, but for the technically savvy, it's a pretty easy change in the shell anyway. Having multiple nfsd running gives you better performance in a multi-user environment and for the most part, the performance is acceptable in a single-user environment. We may consider adding an option for 4.1, but I'd rather keep things less complicated and less cumbersome for the majority of the folks.
As I said, the performance improvement by itself isn't that much.
But a large file written to the ReadyNAS using the default of 8 instances gets so heavily fragmented that afterwards read speed degrades to 50-60% of what would be possible ... (and this is a permanent condtion for this file)
So please, please change the default to using a single instance and add a listbox to the performance options that allows to increase the number of instances when required ...
Gentoo Linux (Windows on VMware) + ReadyNAS NV+
- IBM ThinkCentre A51P: P4 3GHz, 2.5 GB RAM, 2 x 250 GB Samsung SATA HD, NetXtreme BCM5705_2 Gigabit Ethernet
- IBM/Lenovo Thinkpad R60: Core 2 1.83 GHz, 2 GB RAM, 160 GB Samsung SATA HD, NetXtreme BCM5751M Gigabit Ethernet PCI Express
- LevelOne GSW-0804T Gigabit Switch
- APC SMART UPS 750 XL
- ReadyNAS NV+: 1GB RAM [2.5-3-3-7], 2xSeagate ST3500630NS 500GB + 2xSamsung HD501LJ 500GB, XRAID, RAIDiator 4.00b8-p1-T1 [1.00a037]
- Jumbo Frames disabled, Journaling ON, Full Journaling OFF, NFS over TCP (r/wsize=128K) ==> 47.3 MB/s read, 12.2 MB/s write, RSYNC ==> 5-6 MB/s write
User avatar
XLION
Advanced ReadyNAS Expert
 
Posts: 540
Joined: Sat Aug 04, 2007 1:54 pm
Location: Hannover, Germany

Postby bhoar » Tue Oct 09, 2007 5:05 pm

XLION wrote:So please, please change the default to using a single instance and add a listbox to the performance options that allows to increase the number of instances when required ...


I concur with XLION here. Otherwise, all that talk about ext3 being such a low fragmentation-risk filesystem vs. NTFS (and therefore no defrag tools are necessary) will be for naught.

-brendan
Unofficial, rambling and sometimes useful comments can be found above. Official, and always useful, links found below.
If you want official support, please use the phone number or phone number link below.
  • Broken Links Removed for now.
  • United States Support: 888-NETGEAR
  • International Support: Phone Numbers
FW: Hey! They're sending us free lumber!
User avatar
bhoar
ReadyNAS Junkie
 
Posts: 3608
Joined: Sun Jun 26, 2005 12:51 pm
Location: Arlington, VA / Washington, D.C.
ReadyNAS: Pro

Postby MrCyberdude » Wed Oct 10, 2007 2:24 am

Less defragmentation anytime..!!

Defragmentation = Faster DEAD HDD's
Let the users wait, suffer even.
Better them than the admin. ;)

Funny how a system going down changes one's perspective.
ReadyNasPro Pioneer , X6/600RevisionA With Horizontal HDD Mod
I Do not recommend ReadyNasPro Firmware 4.2.8 ,4.2.9 or 4.2.11 due to Hanging and Disconnection issues. 4.2.12-T9-T17 Works Much better.
I Do support WD20eaRs HDD but read up on "2TB WD20EARS HCL Advanced Format 4k Sectors TLER LCC WDidle3" issues
first. 4KB sector issue looks to be fixed with 4.2.12-T9-T17
User avatar
MrCyberdude
Advanced ReadyNAS Expert
 
Posts: 510
Joined: Thu Mar 09, 2006 1:50 am
Location: Australia, Victoria, Melbourne
ReadyNAS: Pro

Next

Return to Public RAIDiator Beta for ReadyNAS NV+/Duo/1100

Similar topics


Who is online

Users browsing this forum: No registered users and 5 guests