Author Topic: Free Space Warning  (Read 2652 times)

Offline MoJo

  • Contributor
  • ***
  • Posts: 6
Free Space Warning
« on: February 22, 2010, 06:29:44 pm »
I love altbinz and use it everyday, wanted to see a simple feature added/ modified into the next versions.

Currently the Free Space Warning is static, as it only warns based on a constant value set in the settings. I would like a dynamic warning that is smart enough to know that your current download queue exceeds the amount being downloaded. Also it has to be smart, as the free space has to be a factor of 2.5 to 3 times bigger than the amount being downloaded, 2 time bigger for the current file and expanded file, plus 0.5 to 1 times for the rar temp file upon unraring.

So in essence:

1GB downloading needs 2.5GB to 3GB of free space, under those nominal values we can assume this file would require more space upon completion. Now the current system is good and I am not asking to replace that lower value that stops the download. I would like this to be added so that it can provide a download check, and spit out a warning that says "this download queue will require 4GB more space to complete properly".

The reason I would like to see this added is because I add quite a few files and several hours later I come back and I ran out of space, resulting in having to move files over. I know I can do the math on every download, but such a feature could take the tedium out of a download and forget process.

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: Free Space Warning
« Reply #1 on: February 23, 2010, 03:00:40 am »
I'm not sure how you figured out those numbers.  Alt.Binz should only need space for all the decoded files + temporary space for any undecoded files (at the rate your machine can decode them, or no extra space if article caching is used effectively).  Then unrar to another drive as most people do, which is always the most optimal solution.

It all depends on your machine's performance.  On mine, with reasonable dl speeds and decent decoding, we'd only be talking extra space for undecoded articles for 1/2 rars - no more than +10%.  But it's actually closer to +0%, since articles are cached in RAM and rarely need to fall back to the disc.


Offline MoJo

  • Contributor
  • ***
  • Posts: 6
Re: Free Space Warning
« Reply #2 on: February 23, 2010, 07:12:15 am »
You are correct in the factor being skewed when thinking of the entirety of the queuesize. The way Altbinz does things is a fifo style, and each complete set is unrar'd and the duplicates erased. The problem is the last file to be added has to be predicted if it will have enough space to unrar successfully and not trigger the free space setting on altbinz., hence it is the only file that relies on that *3 factor.

Unraring to another drive is not the most optimal for organizing. I have Network HD's ... they are not on 24/7, and also I don't want to clog my 100mb/s lan with unraring files or other luxury congestion. Also I archive to my network ... resulting in wise use of bandwidth. I delete the junk or bad quality, and I watch the non-archive material and erase immediately after. That is the optimal usage, because all your doing in the end is dumping it somewhere else ... my somewhere else is organized and has a controlled point of entry.

Code: [Select]
bool Download::onDownload(float downloadSize)
{
float m_freeSpace, m_requiredSpace;
char answer;

m_freeSpace = freeSpace - queueSize;
m_requiredSpace = downloadSize * 3;

if( m_freeSpace <= 0 )
{
cout << "Warning: Not enough space for current download!" << endl;
cout << "Continue yes(y) or No(n)? ";
cin >> answer;

if ( answer == 'y' )
{
return TRUE;
}
else
return FALSE;
}
else if ( m_requiredSpace > m_freeSpace )
{
cout << "Warning: Rough space required to complete this download and unrar sucessfully = " << m_requiredSpace - m_freeSpace << endl;
cout << "Continue yes(y) or No(n)? ";
cin >> answer;

if ( answer == 'y' )
{
return TRUE;
}
else
return FALSE;
}
else
return TRUE;
}

Above is a quick code I wrote to get my revised request. Nothing complicated, I am assuming there is syntax errors in there. Anyways upon importing the NZB, and starting the download sequence, a call to a function belonging to a Download class ... which ensures that the total current file being added to download will occupy the space left over from a 1 to exchange of space from the queuesize to the free space. Ideally with a compression factor in play, queue size should be 1.02 to 1.05 times bigger or 2%-5% bigger. Now the space left over is compared to the required space. This required space is the downloading file's size times the times 3 factor for expansion. This should determine whether there is enough space left to unrar succesfully the last file that is added to the queue. If not, a good estimate of the required space is spit out, with a user input to determine whether to proceed or cancel.

I hope what I am saying makes sense, this is what I call failure to communicate through over engineering :( .

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: Free Space Warning
« Reply #3 on: February 23, 2010, 03:03:37 pm »
Well, the main point seems to be: that calculation is dependent on your specific environment and way of using Alt.Binz.  Why would other users want this?  That would be overkill on my machine.  It's optimal to unrar to different drives or even partitions to keep hard drives healthy: quicker and cleaner.

What's the code for? Alt.Binz is a Delphi app.  ;)

Offline MoJo

  • Contributor
  • ***
  • Posts: 6
Re: Free Space Warning
« Reply #4 on: February 27, 2010, 11:09:12 pm »
Yeah it is on my specific way of using altbinz, but I fathom there others that are like me as well with the same setup ... just as you assume there are others with your setup. All this should do is check the new downloads chances of downloading succesfully with the amount of freespace present. uTorrent has this warning as well, and so do most other apps in the P2P category. It can also apply to your situation of downloading to another drive because the concept of free space on a hard drive is universal. Now the warning will say, "this download needs x amount of space to complete successfully". In altbinz or any newsclient completion is determined as the finished unrar'd file which therefore is affected by the *3 factor.

This is why others should want to use it. As a download warning, and this isn't computationally taxing ... just a pre-download check.

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: Free Space Warning
« Reply #5 on: February 28, 2010, 02:49:57 am »
Again with this mythical *3 number pulled out of a hat.  The point is it would be a useless nag unless we all had your setup.  I don't exactly see other users flocking to add their +1 here, but maybe they're just shy.  ;)

The obvious compromise would be: make it completely user configurable, numbers and all.
« Last Edit: February 28, 2010, 02:53:06 am by Hecks »