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

#76 2008-05-12 23:13:19

SilentException
Member
From: Island of Krk, Croatia
Registered: 2008-05-04
Posts: 148

Re: Fan does run all the time :-(

mig wrote:

SilentException wrote:

can someone share a lsof binary for dns-323?

http://dns323.kood.org/forum/t2139-lsof-DNS-323.html

thank you smile
i didnt feel like setting optware so i just got http://ipkg.nslu2-linux.org/feeds/optwa … 1_arm.ipk, renamed to .tgz and took the binary from there smile
works fine, maybe now i can see why is mldonkey keeping my hdd's up.....


D-Link DNS-323 v1.05 fun_plug-ed + many mods,  2 x 320GB Seagate Barracuda 7200.10 RAID0, Cat6 Gigabit Network, 9k Jumbo Frames, Average (WRITE): 19,32 MB/sec, Average (READ): 28,6 MB/sec

Offline

 

#77 2008-05-13 02:36:57

raid123
Member
Registered: 2008-04-30
Posts: 22

Re: Fan does run all the time :-(

I also have the same question.  Anyone know why mldonkey keeps accessing the HDD?  I have moved my fun_plug.d directory to a USB thumb drive, and my DNS-323 runs completely silent most of the time with both drives spinned down and the fan turned off.  However, after installing mldonkey and pointing the mldonkey folder to the USB drive, I noticed that during downloads, it was continually accessing the first hard drive (hard drive light kept blinking), even though the data directory is on the thumb drive.

Offline

 

#78 2008-05-13 02:41:11

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

Re: Fan does run all the time :-(

swap file?

Offline

 

#79 2008-05-13 03:22:11

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Fan does run all the time :-(

Fordem is probably right.  Telnet in and check out if you are using swap space.  You can always make another partition on your USB drive (or another USB drive) and turn it into swap space.  When I tried compiling a couple of things native, I ended up making a couple of gigs of swap to get it to complete.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#80 2008-05-13 04:05:24

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: Fan does run all the time :-(

used swap space is possible. if you create a swap space on your usb flash drive dont forget to deactivate the swap on the hd's or set the swap space priority on the flash drive much higher. 2nd possibility would be to adjust the kernel swapiness.
A partition is not even necessary. you can also format a file on a filesystem to swapspace and use it. e.g.:
dd if=/dev/null of=/mnt/usbstick/swap.file bs=1M count=512
mkswap /mnt/usbstick/swap.file
swapon /mnt/usbstick/swap.file

Last edited by oxygen (2008-05-13 04:10:44)

Offline

 

#81 2008-05-13 04:44:16

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Fan does run all the time :-(

True, but a swap file is pretty slow in comparison to a partition.  Then again, it probably won't matter in this application.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#82 2008-05-13 05:01:05

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

Re: Fan does run all the time :-(

I have a couple of questions - so please pardon my ignorance

First - if I understand correctly flash memory has a limited life expectancy, it literally wears out, so much so that solid state disks have special "wear leveling" algorithms that move data around to prevent premature disk failure - wouldn't the use of a flash drive for a swap file have similar "wear" issues.

Second - read/write speeds - maybe this is of little relevance, if the intention is to store files being downloaded from the internet, since the bottleneck is likely to be the internet connection, but as I understand it, write speeds to flash memory are pitiful when compared to a disk.

I guess my real curiosity is why is there this obsession to use flash memory with the DNS-323 when there is ample disk space available?

Offline

 

#83 2008-05-13 05:43:34

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Fan does run all the time :-(

I have 2 guesses for that.

1. Power reduction.

2. Sound.  Some people have the DNS in earshot and don't want the drives / fan running all night when they are sleeping.

All this is only speculation, as mine are tucked away in a network cabinet in the basement (at least when I'm not experimenting on them).


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#84 2008-05-13 11:41:34

raid123
Member
Registered: 2008-04-30
Posts: 22

Re: Fan does run all the time :-(

For myself, it's more about (in no particular order):

1) Be Green.  My DNS-323 runs at 36 Watts at boot, 27 Watts when both drives are spinning, about 18 watts when only 1 drive is spinning, and 9 watts when running off the USB flash drive.

2) Less mileage on the hard drive.  If a HD fails, that's 1 TB lost.  Thumb drive?  At 2 GB for $15 for less, it's easy to pop another one in there if it fails.  Downloading bittorrent or running PHP/MySQL is not the main reason I bought my 2 TB of storage, so I'd rather minimize the regular wear and tear on the HD.  Besides, the 1 GB thumb drive I stuck in the DNS-323 is an old stick I didn't use much any more, so I was happy to commission it for something useful.

3) Silence.  No hard drive spinning, no noise.  And without the fan, the unit is completely silent.  Before this, the hard drive would spin up every 10 minutes or something for logging, then spin down.  I've always thought my Desktop PC was noisy, so this is a nice change.

4) It's fun.  Actually solving all the issues it would take to run everything I want to off the USB flash drive is a technical challenge in itself, although it's mostly solved here in this forum.  It's rewarding to walk by the DNS 323 and hear nothing, knowing I've made everything run on the thumb drive.

Last edited by raid123 (2008-05-13 11:43:40)

Offline

 

#85 2008-05-13 12:14:55

SilentException
Member
From: Island of Krk, Croatia
Registered: 2008-05-04
Posts: 148

Re: Fan does run all the time :-(

i agree with raid123 on every sentence! smile could someone give some pointers on adjusting swap and how to chk if the os is swapping? also it would be nice to hear from experienced users what did you do to lower memory consumption of mlnet. atm mine uses 35-40mb which is definatelly too much (all plugins but bittorent are disabled!)


D-Link DNS-323 v1.05 fun_plug-ed + many mods,  2 x 320GB Seagate Barracuda 7200.10 RAID0, Cat6 Gigabit Network, 9k Jumbo Frames, Average (WRITE): 19,32 MB/sec, Average (READ): 28,6 MB/sec

Offline

 

#86 2008-05-13 15:34:02

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Fan does run all the time :-(

SilentException wrote:

...what did you do to lower memory consumption of mlnet. atm mine uses 35-40mb which is definatelly too much (all plugins but bittorent are disabled!)

Were you looking at the output from 'top' or from 'free'?  If it was from 'free' as I supect, then check 'top' for memory usage.  Linux uses available memory like swap space first, because it is much faster than swap space.  It frees it up as programs need it, so at first glance, it looks like your memory is always being sucked up.  It's a more efficient way of doing it than some other operating systems.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#87 2008-05-14 20:40:14

SilentException
Member
From: Island of Krk, Croatia
Registered: 2008-05-04
Posts: 148

Re: Fan does run all the time :-(

bq041 wrote:

SilentException wrote:

...what did you do to lower memory consumption of mlnet. atm mine uses 35-40mb which is definatelly too much (all plugins but bittorent are disabled!)

Were you looking at the output from 'top' or from 'free'?  If it was from 'free' as I supect, then check 'top' for memory usage.  Linux uses available memory like swap space first, because it is much faster than swap space.  It frees it up as programs need it, so at first glance, it looks like your memory is always being sucked up.  It's a more efficient way of doing it than some other operating systems.

was using top. didnt even know about free command smile
mlnet shows up three times in the process list (on top) and each instance is using identical amount of memory 35-45mb. i'm not a guru so i'm not sure would that be 105-135mb total or not?

in any case, indeed it looks like the swapping keeps hd0 up so i will try and create a swap partition on the usb stick. will look around for how to make that happen but if anyone has some useful tips on how to do it the most painless way, shout them out pls smile


D-Link DNS-323 v1.05 fun_plug-ed + many mods,  2 x 320GB Seagate Barracuda 7200.10 RAID0, Cat6 Gigabit Network, 9k Jumbo Frames, Average (WRITE): 19,32 MB/sec, Average (READ): 28,6 MB/sec

Offline

 

#88 2008-05-14 20:49:51

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: Fan does run all the time :-(

bq041 wrote:

True, but a swap file is pretty slow in comparison to a partition.

Thats a common missunderstanding. The difference is not noticeable.
see: http://lkml.org/lkml/2005/7/7/326

if you afraid of a performance hit, create the swapfile before other files on the partition. this will prevent fragmentation (which isn't an issue on flash devices at all).

Offline

 

#89 2008-05-14 21:43:40

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

Re: Fan does run all the time :-(

Fragmentation is an issue on any and every storage medium that allows random access read/write/delete

Take your random access medium and write a bunch of 1MB files to it - for the sake of simplified graphics X represents a 1MB file and _ represents an empty space with a cpacity of 1 MB - you have written 20 such files - so it looks like this XXXXXXXXXXXXXXXXXXXX____________ - now delete every other file and you get this X_X_X_X_X_X_X_X_X_X____________ - now write a single 15 MB file - and assuming that what you have is a 32 MB device (remember those?) - and you get something like this XYXYXYXYXYX_X_X_X_X_YYYYYYYYYY or even this - XYXYXYXYXYXYXYXYXYXYYYYYY_______

I could be wrong but I believe creating a swapfile is a guaranteed way to end up with fragmentation.

This might make interesting reading.

The only storage medium that does not suffer from fragmentation is a serially written medium - for example tape -

Last edited by fordem (2008-05-14 21:46:05)

Offline

 

#90 2008-05-14 22:06:49

SilentException
Member
From: Island of Krk, Croatia
Registered: 2008-05-04
Posts: 148

Re: Fan does run all the time :-(

on flash drives, fragmentation has no impact on performance so i created a 128mb swap file and added it to swap total with swapup. my question is how do you tell kernel the priority so it uses that swap before the disk swap?


D-Link DNS-323 v1.05 fun_plug-ed + many mods,  2 x 320GB Seagate Barracuda 7200.10 RAID0, Cat6 Gigabit Network, 9k Jumbo Frames, Average (WRITE): 19,32 MB/sec, Average (READ): 28,6 MB/sec

Offline

 

#91 2008-05-14 22:28:14

blahsome
Member
Registered: 2008-03-02
Posts: 157

Re: Fan does run all the time :-(

This article is helpful in understanding flash drive fragmentation.

http://searchwincomputing.techtarget.co … 72,00.html

Last edited by blahsome (2008-05-14 22:28:35)

Offline

 

#92 2008-05-14 22:49:34

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

Re: Fan does run all the time :-(

SilentException - did you read the link?

blahsome - whilst I generally have some amount of respect for Serdar Yegulalp's contributions, I do not always agree with him - you may notice that he refers to "data that I have seen" rather than tests that I have done - the link that I have provided does show the tests that that individual claims to have done - so for now I'll respond like Serdar Yegulalp and simply say that the data I have seen does show that fragmentation can have a significant impact on flash memory performance.

We have moved from whether or not fragmentation is an issue on flash drives - my position is simply that it does occur - to whether or not defragmentation of flash makes sense and it appears that Serdar Yegulalp's position is "perhaps" ....

In short, defragmenting flash memory is probably not worth it unless you can demonstrate that there is a perceptible speed improvement by doing so. The key word is perceptible, and unless you are using measurable and testable metrics for judging such a thing, you may not be witnessing anything other than subjective bias about how fast such things should be.

Unless I'm very much mistaken what is provided in the page I linked to can be defined as "measurable and testable metrics".

Now - whether or not performance degradation does occur is of little importance to me - it has no impact on my usage of flash memory which is essentially as "portable storage" - if you like a compact, high capacity, diskette - so I'll step back at this point.

Offline

 

#93 2008-05-14 23:22:55

SilentException
Member
From: Island of Krk, Croatia
Registered: 2008-05-04
Posts: 148

Re: Fan does run all the time :-(

i did read it now. didnt even see there is a link the first time
so you're right, and those benchmarks prove it.. still, if i used dd to create swap on a blank usb, it should be fine and contiguous right?

btw i figured out the priority thing too. swapon should have -p (priority) switch but the version on dns-323 doesn't but it just continuously lowers the priority each time swap is added. so these lines in funplug should do the trick:

swapoff /dev/hda1
swapoff /dev/hdb1
swapon /usb/ffp/swap/extraswap
swapon /dev/hda1
swapon /dev/hdb1

cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/sda1                               partition       530104  0       -4
/mnt/USB/ffp/swap/extraswap  file              131064  0       -3
/dev/sdb1                               partition       530104  0       -5

weeeee smile


D-Link DNS-323 v1.05 fun_plug-ed + many mods,  2 x 320GB Seagate Barracuda 7200.10 RAID0, Cat6 Gigabit Network, 9k Jumbo Frames, Average (WRITE): 19,32 MB/sec, Average (READ): 28,6 MB/sec

Offline

 

#94 2008-05-14 23:32:49

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: Fan does run all the time :-(

SilentException wrote:

on flash drives, fragmentation has no impact on performance so i created a 128mb swap file and added it to swap total with swapup. my question is how do you tell kernel the priority so it uses that swap before the disk swap?

normally this is done via swapon -p pri device. unfortunatly in the busybox version of swapon, this parameter does not exist. i just deactivated the swap on the disks. my 128 mb swap are more than enough and i have quite a few apps running (own mt-daapd, mediatomb, rsyncd, nfsd)

fyi: you get some infos about the swap via cat /etc/swaps.

Offline

 

#95 2008-05-15 00:42:00

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

Re: Fan does run all the time :-(

SilentException wrote:

i did read it now. didnt even see there is a link the first time
so you're right, and those benchmarks prove it.. still, if i used dd to create swap on a blank usb, it should be fine and contiguous right?

It'll be contiguous only directly after it's created - swap files are constantly having blocks changed - ie written, read, over written etc., personally I feel that if flash memory is used for a swap file that fragmentation will be unavoidable - how long it takes before it becomes noticeable (if it ever becomes noticeable) will depend on the size of the flash drive, the size of the swap file and how active the swapping is

You need to bear in mind that given the nature of what's being done - torrent downloads - the performance degradation may never be an issue, as in - whenever it's finished downloading, it's finished downloading - I'd be curious to know, though, if the degradation is noticeable when the NAS is being used for, perhaps more normal, NAS related tasks.

I've seen complaints in this forum about the unit - I'll use my term - bogging down with stuff like Twonky media - and sort of shook my head and gone my way, my take being if you want a box that delivers everything including the kitchen sink then go buy a PC.

Offline

 

#96 2008-05-15 00:50:56

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: Fan does run all the time :-(

fordem wrote:

SilentException wrote:

i did read it now. didnt even see there is a link the first time
so you're right, and those benchmarks prove it.. still, if i used dd to create swap on a blank usb, it should be fine and contiguous right?

It'll be contiguous only directly after it's created - swap files are constantly having blocks changed - ie written, read, over written etc., personally I feel that if flash memory is used for a swap file that fragmentation will be unavoidable.

Thats just wrong. Seems like you didn't read the link i posted:

> 2. Is it possible for the swapfile to become fragmented over time, or
> does it just keep using the same blocks over and over? i.e. if it's
> all contiguous when you first create the swapfile, will it stay that
> way for the life of the file?

The latter.  Create the swapfile when the filesystem is young and empty,
it'll be nice and contiguous.  Once created the kernel will never add or
remove blocks.  The kernel won't let you use a sparse file for a swapfile.

Offline

 

#97 2008-05-15 01:10:10

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Fan does run all the time :-(

He's refering to the block in the file, not the overall file.  All the blocks of the file may indeed be contiguous, however the data that is written into the individual blocks will become fragmented withing the constraints of the overall file.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#98 2008-05-15 02:15:57

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

Re: Fan does run all the time :-(

Oxygen - no I didn't read that link - and having read it, I'm not certain that the person responding to the question was correct.

I'm not familiar with how linux uses a swapfile, the responder seems to feel that the size of the swapfile is fixed and he may or may not be correct, I do know that other operating systems (Windows, OSX) do use variable size swapfiles.

Think of the swapfile as the random access storage medium - it has a constant size, but within it, there are individual blocks that are constantly being randomly written, read, and overwritten - fragmentation is possible.

Consider this - fragmentation occurs in dynamic RAM - i(the DIMMs of your PC) - you think it won't occur in virtual memory (the swapfiles)?

Offline

 

#99 2008-05-15 11:55:59

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: Fan does run all the time :-(

fordem wrote:

Oxygen - no I didn't read that link - and having read it, I'm not certain that the person responding to the question was correct.

The guy who wrote it, was Andre Morton. The second person in Linux Kernel development after Linus Torvald.

I'm not familiar with how linux uses a swapfile, the responder seems to feel that the size of the swapfile is fixed and he may or may not be correct, I do know that other operating systems (Windows, OSX) do use variable size swapfiles.

It's correct. Als i posted earlier, the way of creating a swap file is using dd to make a empty file with fixed size.

Think of the swapfile as the random access storage medium - it has a constant size, but within it, there are individual blocks that are constantly being randomly written, read, and overwritten - fragmentation is possible.

Consider this - fragmentation occurs in dynamic RAM - i(the DIMMs of your PC) - you think it won't occur in virtual memory (the swapfiles)?

Sure. But thats not a point in swap file vs. swap partition, is it?

Offline

 

#100 2008-05-15 15:40:24

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

Re: Fan does run all the time :-(

I'm not going to get into a discussion on swap file vs. swap partition.

I got into this on - fragmentation is not an issue on flash memory - which is incorrect, fragmentation will and does occur on any random access storage medium that allows read/write/delete with variable file (or block) sizes - period.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB