News for hackers. Stuff that matters.
Re:Dropbox will kill your insane MacBook Air 2013 battery by jwr on Wednesday July 03, 2013 @05:28AM (#5983365)
Dropbox is terrible with CPU usage. This is something I reported to them several times, but it seems they don't really care.

Last I tested, Dropbox consumed CPU for ANY changes ANYWHERE in your filesystem, not just within the Dropbox folder. So its (slow) code processed changes even when you untarred a large set of files somewhere in /tmp.

I also stopped using Dropbox for storing my code because of that — it's nearly useless, as it consumes so much CPU and eats so much battery life, that it simply isn't worth the effort.

Another problem with Dropbox is that upon login it indexes the entire Dropbox, which if you have an HDD basically kills the machine for several minutes, e.g. you can't do anything else. That happens to me on a Mac Pro. On an SSD-equipped MacBook things are better, but it's still a monstrous operation.

And to everyone that says you should not store code in dropbox: a) there are good and legitimate reasons for doing so, b) dropbox could work a little more on optimizing CPU usage instead of adding "save your photos to Dropbox" features.

Re:Dropbox will kill your insane MacBook Air 2013 battery by davedx on Wednesday July 03, 2013 @06:04AM (#5983466)
> And to everyone that says you should not store code in dropbox: a) there are good and legitimate reasons for doing so

I'm genuinely curious: why do this, as opposed to using a DVCS like git?

Re:Dropbox will kill your insane MacBook Air 2013 battery by jwr on Wednesday July 03, 2013 @07:25AM (#5983775)
I do use git. But I often develop on two machines: a laptop and a Mac Pro. Which means I am often in the middle of something when I have to just pick up the laptop and go. "In the middle of something" means that just pushing commits over doesn't cut it. I can (and do) rsync stuff over, but that is annoying and very error-prone (it's too easy to sync stuff the other way around and lose work).

I guess you could say Dropbox gives me finer sync granularity than git does.

Dropbox seems like a perfect solution: have a single place where you keep code, develop on two machines, just pick up your laptop and leave whenever you want, without worrying about sync.

Re:Dropbox will kill your insane MacBook Air 2013 battery by timtadh on Wednesday July 03, 2013 @07:55AM (#5983889)
I don't understand. You can easily cut a branch commit. Push the branch. Pull the branch finish it. Commit. (optionally rebase). Delete the temporary branch. Git handles this problem very well.
Re:Dropbox will kill your insane MacBook Air 2013 battery by jwr on Wednesday July 03, 2013 @08:24AM (#5984026)
Right. I get a call, I need to leave for a meeting in 5 minutes. This is exactly the time when I want to cut branch commits, push branches, pull branches, commit and rebase. Even rsync is better than that.

Put it another way, I don't understand why you'd use Dropbox at all, after all you could easily version all your files in git, using push/pull/branch/commit/rebase to get your data to your different machines. Git handles this problem very well, after all.

Re:Dropbox will kill your insane MacBook Air 2013 battery by snowwrestler on Wednesday July 03, 2013 @10:57AM (#5984922)
The specific problem with git in Dropbox is that working in git can cause a large number of transient files changes as you, for example, switch branches. Dropbox doesn't know those are transient changes and attempts to sync all of them. That is one reason it can drain battery so fast.

Obviously with regular files, that is not an issue, so Dropbox works well. (unless you're managing them with git, I guess)

If you're willing to accept the "lightness" of git branching and commits, it's possible to "save and sync" your work very quickly. Assuming you're on a dev branch:

git add -A

git commit -m "temp commit 2013-7-3"

git push origin

You can even script this, see for example:

http://stackoverflow.com/questions/8482843/git-commit-bash-s...

Then when you're ready to work on a different machine, you fetch from origin.

If you want to keep your commits meaningful on your dev branch, you can create a temp branch first, then rebase later to get rid of the ugly temp commit.

git checkout -b temp123

Re:Dropbox will kill your insane MacBook Air 2013 battery by timtadh on Wednesday July 03, 2013 @10:26AM (#5984698)
I don't use dropbox at all? To me it is a great solution for consumers but my needs are different. I use git + standard unix tools. For backup I use tarsnap. It rocks.
Re:Dropbox will kill your insane MacBook Air 2013 battery by jasonlotito on Wednesday July 03, 2013 @08:06AM (#5983944)
You don't understand or you didn't spend ti e thinking about that. It's doing all those steps, or doing nothing and achieving the same result. Not sure what you don't understand.
Re:Dropbox will kill your insane MacBook Air 2013 battery by StavrosK on Wednesday July 03, 2013 @08:01AM (#5983919)
My use case: The "extras" (files not in the DVCS like libraries, dependencies, etc) are just as important for working, but they take too long to transfer/update from one PC to the other, especially for things like GAE which don't have easy ways to manage.

Dropbox could help there, but it does not.

Re:Dropbox will kill your insane MacBook Air 2013 battery by ajuc on Wednesday July 03, 2013 @09:04AM (#5984212)
I use both dropbox and git for my home projects. I sometimes develop on my desktop, sometimes on my wifes laptop, and sometimes remotely on another server through ssh, and I don't want to commit/add stuff to the git index just because I move from one computer to another. I could do this with branches, but it's too much hassle when I just want to shut down computer.

So I work on a directory that is in dropbox, and in git, and I can instantly shutdown my PC and start writing code on the laptop. Commiting changes is a separate step. It's quite convenient. Also I can test the code by accessing dropbox public link (it's mostly javascript and static websites), and there's no separate "deploy" step - when I save a file on any computer the change is ready to be tested, always at the same place. With git I would need to remember to commit, and update before I test, or I would need to set up a test server on every computer, and depending on where I work I would need to access different address. The difference between 15 seconds and 0 seconds to test small change is VERY significant.

Re:Dropbox will kill your insane MacBook Air 2013 battery by robryan on Wednesday July 03, 2013 @06:16AM (#5983508)
As opposed to there probably aren't really good reasons. Doing it in addition to source control seems like something everyone should do though.

The way people generally use source control isn't to push every single line added or changed to a remote copy of the repo as soon as it is done. A commit is more tied to completing a task, you need something else to cover you for loss for smaller amounts of code than that if your computer dies.

Re:Dropbox will kill your insane MacBook Air 2013 battery by dhimes on Wednesday July 03, 2013 @08:40AM (#5984103)
This is apparently the subject of some debate.

More specifically to me, it depends on what branch I'm on. If I'm on dev, I have no problem with big commits. (For features I'll often set a bookmark [hg]- maybe even clone and work from the clone if it's risky).

But if I'm on test or hotfixing on stable, I use very small commits so that I can easily graft (backport) back to dev.

But at the very least I have more than one commit message like -FIX blah blah commit so can get from <name of other machine>

Re:Dropbox will kill your insane MacBook Air 2013 battery by Wintamute on Wednesday July 03, 2013 @08:40AM (#5984106)
My entire work folder is inside my Dropbox. Most of those projects are under Git version control, other temporary folders, toy projects and bits and bobs are not. This way my work folder is nominally backed up and synced across my machines. I wouldn't advocate using Dropbox as the only/primary backup and version control for important projects, but its totally legitimate to have code inside of a Dropbox.
Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @09:27AM (#5984329)
My point exactly.
Re:Dropbox will kill your insane MacBook Air 2013 battery by columbo on Wednesday July 03, 2013 @07:49AM (#5983866)
I use dropbox as a client facing equivalent of FTP.

That way the client can have programmers/designers change their UI without needing any access into the server. It also allows me to share each site and doesn't bring the entire headache of managing accounts. I simply share the yoursite.com folder to the client. If a client has multiple sites it's just as easy to share all of them.

Re:Dropbox will kill your insane MacBook Air 2013 battery by stinos on Wednesday July 03, 2013 @06:12AM (#5983495)
same question here. If you can get free private git repositories on services like bitbucket, it's sort of a mystery to me why one would want to lose true versioning and go with plain backup instead.
Re:Dropbox will kill your insane MacBook Air 2013 battery by snom380 on Wednesday July 03, 2013 @06:27AM (#5983549)
You can have both. If you put your working directory in Dropbox you will have a copy of your uncommitted work as well.

Also, in many cases it is easier for a graphic designer or just a customer to put stuff in a Dropbox folder that will sync to their website, than uploading stuff using a web form or learning to use git and X amount of deployment tools.

Re:Dropbox will kill your insane MacBook Air 2013 battery by rickyc091 on Wednesday July 03, 2013 @06:35AM (#5983576)
I'm part of the camp that uses both Dropbox / Git for my development work. I've actually had Dropbox save me a few times due to nasty rebases. For a lot of one off scripts, I don't really commit them into git so that's where it comes in handy. The extra redundancy doesn't hurt...
Re:Dropbox will kill your insane MacBook Air 2013 battery by duncan_bayne on Wednesday July 03, 2013 @07:21AM (#5983760)
> The extra redundancy doesn't hurt...

... unless you're running on batteries.

Re:Dropbox will kill your insane MacBook Air 2013 battery by snom380 on Wednesday July 03, 2013 @06:23AM (#5983529)
One advantage is near-instant sync between many computers. With a VCS you have to push and pull manually or set up some complicated cron jobs to automate it.
Re:Dropbox will kill your insane MacBook Air 2013 battery by SurfScore on Wednesday July 03, 2013 @07:20AM (#5983754)
Dropbox revert to previous versions has saved my ass multiple times when something goes wrong in Xcode that I can't undo.
Re:Dropbox will kill your insane MacBook Air 2013 battery by fredoliveira on Wednesday July 03, 2013 @07:25AM (#5983772)
Xcode has built-in git support which you should use.
Re:Dropbox will kill your insane MacBook Air 2013 battery by SurfScore on Wednesday July 03, 2013 @07:36AM (#5983823)
I'm talking weird glitches like a nib gets corrupted and I've made enough changes to matter but haven't committed anything yet
Re:Dropbox will kill your insane MacBook Air 2013 battery by 501 on Wednesday July 03, 2013 @08:21AM (#5984012)
That sort of glitch sounds like the kind of thing Dropbox does (did?) from time to time because it's not aware of bundles. (For those unaware, on OS X many files are actually folders, eg: http://en.wikipedia.org/wiki/Rich_Text_Format_Directory)
Re:Dropbox will kill your insane MacBook Air 2013 battery by cones688 on Wednesday July 03, 2013 @06:20AM (#5983515)
> Another problem with Dropbox is that upon login it indexes the entire Dropbox

I haven't used Dropbox in a while as a local client for other reasons but I think people need to appreciate this is the payoff for having the convenience? How can one expect it to sync changes if it never scans or detects changes? People seem to want a magical product where it never uses any HD throughput or CPU to index/scan/upload megabytes of data, sure it can look for changes less often but that decreases the usefulness of the product.

As a sidenote, surely all the dropboxers use dropbox for everything (they have unlimited accounts) so they must be 100% aware of this? in which case there must be concrete reasons for this!?

Re:Dropbox will kill your insane MacBook Air 2013 battery by jwr on Wednesday July 03, 2013 @07:28AM (#5983786)
I am not saying Dropbox sucks, I am just criticizing those aspects which I think could be improved and are being neglected.

From my conversations with Dropbox support I understood that Dropbox really can't handle a large number of small files. The large plans are intended for people who store large files, not lots of stuff.

Re:Dropbox will kill your insane MacBook Air 2013 battery by tokenizerrr on Wednesday July 03, 2013 @07:07AM (#5983702)
Well, just my 2 cents...

The indexation doesn't need to happen immediately upon boot. Do one directory every minute or so, let the computer start up and do other things while your background task runs.

Changes are detected because the operating system notifies dropbox of changes made, they're not continuously scanning the drive. From other comments it sounds like dropbox has registered a hook like that for the entire filesystem, instead of just the working folder. That seems unnecessary.

Re:Dropbox will kill your insane MacBook Air 2013 battery by mikevm on Wednesday July 03, 2013 @07:21AM (#5983759)
My computer comes to a halt on boot because of the Dropbox client. I hate it. For some reason SugarSync does not do this kind of thing, so there has to be a way to do it in a smarter way.

Why can't Dropbox remember the state of the files in your dropbox folder, and upon login, grab state of the files on the Dropbox server and do a simple comparison, without re-calculating hashes for the files on your computer?

Re:Dropbox will kill your insane MacBook Air 2013 battery by nitrogen on Wednesday July 03, 2013 @07:35AM (#5983822)
Your files may have changed between logins (multi-user system, multi-OS system, etc.).
Re:Dropbox will kill your insane MacBook Air 2013 battery by mikevm on Wednesday July 03, 2013 @09:42AM (#5984407)
In that case, you can look at the modified date first. Better than re-calculating hashes.

I guess the methods I propose will not guarantee proper syncing if for some reason a file has changed but the metadata hasn't...

Re:Dropbox will kill your insane MacBook Air 2013 battery by nitrogen on Wednesday July 03, 2013 @07:15PM (#5988114)
A hashing/checksumming filesystem would make it possible to determine whether a file's contents have changed without reading the file. The burden of computing the checksum is then shifted to writing, which in theory occurs once per sync in the case of Dropbox. This burden is merely computational, rather than a complete disk I/O burden imposed by hashing the file when Dropbox restarts.
Re:Dropbox will kill your insane MacBook Air 2013 battery by wslh on Wednesday July 03, 2013 @07:26AM (#5983776)
So, we need a per application battery usage indicator? Surely this application exists.
Re:Dropbox will kill your insane MacBook Air 2013 battery by Terretta on Wednesday July 03, 2013 @07:50AM (#5983871)
It's in beta, coming this fall: Mavericks.

The new battery indicator on the menu bar identifies apps that consume the most energy, and Activity Monitor now details energy consumption per process.

First in list of features: https://developer.apple.com/osx/whats-new/

Re:Dropbox will kill your insane MacBook Air 2013 battery by streeter on Wednesday July 03, 2013 @12:03PM (#5985433)
Anyone running Mavericks seen what it says for Dropbox? I've seen reports for Chrome and Safari, but not Dropbox yet.
Re:Dropbox will kill your insane MacBook Air 2013 battery by wslh on Wednesday July 03, 2013 @09:12AM (#5984248)
On Windows? I can't find one.
Re:Dropbox will kill your insane MacBook Air 2013 battery by hnha on Wednesday July 03, 2013 @08:18AM (#5983996)
on Linux there is powertop, awesome piece of libre software by Intel
Re:Dropbox will kill your insane MacBook Air 2013 battery by cnvogel on Wednesday July 03, 2013 @04:42AM (#5983207)
That finding might be quite interesting and all... but I'm thoroughly confused about that guy always quoting power consumption in mAh (which is the unit for electrica charge).

I'd also check if that guy's dropbox daemon(s) are stuck in an obvious loop. I'm logged on in my private server, and when it's idle there's hardly any activity on the dropbox threads, the main CPU consumer is one servicing what I suspect to be the main select() loop. And that thread basically stat()ing the .dropbox/config.dbx file every 2 seconds, and reads 16 bytes out of it. That should hardly be measureable in terms of power consumptions on a modern CPU.

Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @06:09AM (#5983481)
Thanks for pointing this out. It's a typo, I meant mA, not mAh. Fixed.
Re:Dropbox will kill your insane MacBook Air 2013 battery by demallien on Wednesday July 03, 2013 @08:04AM (#5983940)
No, that is not a typo. Thos is a typo - an error created during the mechanical act of typing. Yours was just a plain mistake, you got the units wrong. Own it and learn from the error instead of excusing it away.
Re:Dropbox will kill your insane MacBook Air 2013 battery by hackmiester on Wednesday July 03, 2013 @09:19AM (#5984285)
I didn't see the article before fixes, but I seem to often type "driver" instead of "drive". If one typed "mAh" enough, don't you think a similar thing could happen?
Re:Dropbox will kill your insane MacBook Air 2013 battery by Uchikoma on Wednesday July 03, 2013 @09:19AM (#5984284)
I guess you might not be as good with words in Schwizerdütsch as he is in English.
Re:Dropbox will kill your insane MacBook Air 2013 battery by demallien on Wednesday July 03, 2013 @11:45AM (#5985311)
Probably not, but I reckon my French would give his English a run for its money :P
Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @09:31AM (#5984348)
Lol. Thanks. But I'm from the french-speaking part of the country.
Re:Dropbox will kill your insane MacBook Air 2013 battery by Uchikoma on Tuesday July 09, 2013 @06:53AM (#6012025)
D*mn ;-)
Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @08:54AM (#5984167)
Much anger, sense I can.
Re:Dropbox will kill your insane MacBook Air 2013 battery by 1_player on Wednesday July 03, 2013 @08:27AM (#5984049)
Bad day at work?
Re:Dropbox will kill your insane MacBook Air 2013 battery by omarrr on Wednesday July 03, 2013 @04:24AM (#5983147)
> I use it to store my code repository [...] Not using Dropbox is not an option for me as I switch machines several times during the day.

I'd suggest you invest in a hosted git repo.

Re:Dropbox will kill your insane MacBook Air 2013 battery by adamors on Wednesday July 03, 2013 @05:08AM (#5983301)
No need really. Bitbucket offers an unlimited number of private repos, it's ideal for this stuff.
Re:Dropbox will kill your insane MacBook Air 2013 battery by kayoone on Wednesday July 03, 2013 @05:44AM (#5983410)
i actually do the same as the op and i really like to have a seperate backend up copy of the code in dropbox BEFORE i commit to git. Furthermore i dont really want to commit only because i am changing machines, but if i have something significant and non breaking to commit. This is less of a problem with git as you can just work in your own branches very easily, but still, working on code on multiple machines is just seamless with dropbox.
Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @04:38AM (#5983190)
I store a lot more than just a git repo in Dropbox. I also use it to share files, etc. But yes, I'm starting to look at alternatives. Maybe I'll develop a small utility to push/pull/share files from my home NAS upon request rather than having a continuous process running in the background.
Re:Dropbox will kill your insane MacBook Air 2013 battery by tluyben2 on Wednesday July 03, 2013 @04:40AM (#5983203)
You can also, what I did, switch dropbox off and switch it on only when you are connected to power for a sync. It's not ideal, but it works. I don't see how dropbox could do better though. If you do it manually to your NAS, you basically do the same as switching dropbox on/off or dropbox in a cronjob. Anything monitoring your file system and synching up with many small files will incur load like this.
Re:Dropbox will kill your insane MacBook Air 2013 battery by tommorris on Wednesday July 03, 2013 @08:43AM (#5984122)
I use ControlPlane - http://www.controlplaneapp.com/ - which monitors your "context" (like location etc.) and lets you trigger events on context change.

Just added some rules so that Dropbox quits when I'm in my "mobile" context, but reopens when I am in my "home" or "office" contexts. Will see whether it works on my commute later.

Re:Dropbox will kill your insane MacBook Air 2013 battery by tluyben2 on Wednesday July 03, 2013 @01:38PM (#5986198)
Nice! Thanks for that tip.
Re:Dropbox will kill your insane MacBook Air 2013 battery by tommorris on Wednesday July 03, 2013 @03:36PM (#5987024)
And I'll note that after my commute home, I do seem to have a bit more battery life than usual. So that's a win.
Re:Dropbox will kill your insane MacBook Air 2013 battery by icebraining on Wednesday July 03, 2013 @05:25AM (#5983355)
It already exists, it's called git annex. It uses git to keep track of where files are (but doesn't check them in), so you can just do:

  $ git annex add myfile
  $ git annex copy --to=NAS myfile
  $ git annex get myotherfile
  $ git annex drop --from=NAS myotherfile
If the NAS has rsync support, you can add it with a single command:

  $ git annex initremote NAS type=rsync \
    rsyncurl=rsync://example.com/myrsync encryption=<gpg-email>
http://git-annex.branchable.com/
Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @05:34AM (#5983380)
Thanks! I'm taking a look at this now.
Re:Dropbox will kill your insane MacBook Air 2013 battery by dalore on Wednesday July 03, 2013 @04:45AM (#5983225)
git repo outside of dropbox to store code and changes, but use dropbox to share project files like docs etc. Works well.
Re:Dropbox will kill your insane MacBook Air 2013 battery by InclinedPlane on Wednesday July 03, 2013 @05:00AM (#5983275)
Or put gitlab on some VPS you own.
Re:Dropbox will kill your insane MacBook Air 2013 battery by mariusmg on Wednesday July 03, 2013 @06:23AM (#5983530)
usb stick + truecrypt volume for me.Fast and secure. Also my private code is not on somebody else server.
Re:Dropbox will kill your insane MacBook Air 2013 battery by bherms on Wednesday July 03, 2013 @04:49AM (#5983236)
I had this happen in the past too and found it to be the result of two issues:

1) Using dropbox to house a very large git repo with massive changes and tons of branches... Every time I switched branches, the hundreds of files would change and obviously kick off a major sync job.

2) There were a few files in a folder than had the owner set to the wrong owner and Dropbox couldn't get permission to access them. This caused it to get stuck in a loop trying to sync those files and Dropbox ended up running my CPU up to over 100% load.

Fix those issues and you shouldn't see it causing any more problems with your battery life.

Re:Dropbox will kill your insane MacBook Air 2013 battery by InclinedPlane on Wednesday July 03, 2013 @04:59AM (#5983270)
Try this: separate out the git directory from the working directory so that the working directory is not in dropbox but the git directory is. That might solve some of your problems.

E.g.: git --git-dir=/home/me/dropbox/git/proj --work-tree=/home/me/proj init

Re:Dropbox will kill your insane MacBook Air 2013 battery by cnvogel on Wednesday July 03, 2013 @08:22AM (#5984019)
(1) you can also use the GIT_DIR environment variable, which might save some typing during development

(2) another solution is to just clone the bare repository in Dropbox to a temp-directory, work there, and push the changes back to the Dropbox'ed repo. Saves you the effort to specify GIT_DIR or --git-dir all the time and is the saner approach if you have to switch back and forth between different repos.

    $ GIT_DIR=~/Dropbox/my_repo git init --bare
    Initialized empty Git repository in /home/chris/Dropbox/my_repo/

    $ git clone ~/Dropbox/my_repo
    Initialized empty Git repository in /home/chris/my_repo/.git/
    warning: You appear to have cloned an empty repository.

    $ cd my_repo ; touch README
    $ git add README ; git commit -m "README" ; git push origin master
    [master (root-commit) ada37ca] README
     0 files changed, 0 insertions(+), 0 deletions(-)
     create mode 100644 README
    Counting objects: 3, done.
    Writing objects: 100% (3/3), 213 bytes, done.
    Total 3 (delta 0), reused 0 (delta 0)
    Unpacking objects: 100% (3/3), done.
    To /home/chris/Dropbox/my_repo
     * [new branch]      master -> master
Re:Dropbox will kill your insane MacBook Air 2013 battery by raverbashing on Wednesday July 03, 2013 @05:03AM (#5983288)
Don't use dropbox to solve a solved problem: git backups should go to another git "server" (like bitbucket or github)

But yes, the dropbox client devs should go through these bugs and hopefully fix them

Re:Dropbox will kill your insane MacBook Air 2013 battery by bherms on Wednesday July 03, 2013 @06:09AM (#5983479)
Yeah, was just oversight on my part at the time... Luckily figured out what was wrong and went another route instead of keeping things in dropbox.
Re:Dropbox will kill your insane MacBook Air 2013 battery by easytiger on Wednesday July 03, 2013 @04:59AM (#5983266)
> Using dropbox to house a very large git repo with massive changes and tons of branches... Every time I switched branches, the hundreds of files would change and obviously kick off a major sync job.

I really have to say honestly: no shit. Sorry if i sound crass but really? When you use an arbitrary piece of software to automatically modify 100s of files the piece of software designed to detect that exact event has do do work and you are complaining? The mind boggles

Re:Dropbox will kill your insane MacBook Air 2013 battery by simonh on Wednesday July 03, 2013 @05:19AM (#5983335)
Which part of that comment looked to you like a complaint?
Re:Dropbox will kill your insane MacBook Air 2013 battery by bherms on Wednesday July 03, 2013 @06:07AM (#5983475)
Wasn't complaining at all... Just pointing out the mistake I made.
Re:Dropbox will kill your insane MacBook Air 2013 battery by officialjunk on Wednesday July 03, 2013 @05:21AM (#5983341)
easy tiger
Re:Dropbox will kill your insane MacBook Air 2013 battery by jlgreco on Wednesday July 03, 2013 @05:53AM (#5983435)
If you are going to use git/Dropbox like that (and I can't say I really recommend it in the first place) then you should keep a bare repo in dropbox and use it as a local 'remote' (check out working repos from it on each computer that you are working on, and push/pull to/from the bare repo in Dropbox).
Re:Dropbox will kill your insane MacBook Air 2013 battery by maikhoepfel on Wednesday July 03, 2013 @05:05AM (#5983295)
The only takeaway is that his power usage shouldn't be that high with Dropbox idling/paused. But given that he's * surprised at it using a lot of power when doing the initial sync * decided to have a git repo inside Dropbox (just don't do it, you will run into trouble; and it will cause heavy sync activity, thus waking CPU and wifi) * using a unit of capacity to express power consumption

I'm not sure I trust his methods.

I regularly turn off Dropbox on and off when switching between mobile broadband and wifi, and haven't seen any difference in power consumption. That's on Ubuntu 13.04 @ Thinkpad T530.

Re:Dropbox will kill your insane MacBook Air 2013 battery by threeseed on Wednesday July 03, 2013 @05:17AM (#5983324)
Dropbox behaves very differently on OSX versus Linux I've found.
Re:Dropbox will kill your insane MacBook Air 2013 battery by throwaway2048 on Wednesday July 03, 2013 @06:03AM (#5983463)
likely because linux has inotify
Re:Dropbox will kill your insane MacBook Air 2013 battery by andor on Wednesday July 03, 2013 @06:21AM (#5983522)
Every modern operating system has inotify-like capabilities. Mac OS has an integrated desktop search since 2005, which wouldn't be feasible without filesystem events.
Re:Dropbox will kill your insane MacBook Air 2013 battery by aidos on Wednesday July 03, 2013 @06:33AM (#5983568)
Dropbox has its own process though, doesn't it? dbfseventsd.

sudo fs_usage -w

I've been watching it recently and it seems to touch files that it shouldn't need to. I need to do more investigation. I uninstalled backblaze recently because I discovered that it manually scans the whole filesystem _all the time_.

Re:Dropbox will kill your insane MacBook Air 2013 battery by Osmium on Wednesday July 03, 2013 @08:17AM (#5983992)
Thanks for the Backblaze info! That's really good to know. Do you know if CrashPlan is any saner? Resource usage was a big factor when deciding between the two, and I want to know if I've made the right choice :)
Re:Dropbox will kill your insane MacBook Air 2013 battery by aidos on Wednesday July 03, 2013 @05:30PM (#5987654)
I haven't used CrashPlan so I can't really say, sorry. I've moved to Arq now which has been working very well for me but it's OSX only.
Re:Dropbox will kill your insane MacBook Air 2013 battery by Osmium on Wednesday July 03, 2013 @06:16PM (#5987853)
Thanks for the reply -- I've looked at Arq before too. I find it interesting Arq (S3) is a third the price of Tarsnap (S3).

Out of interest, if you don't mind me asking, how large is your backup, and do you use S3 or Glacier backend?

Re:Dropbox will kill your insane MacBook Air 2013 battery by aidos on Thursday July 04, 2013 @05:29AM (#5989871)
Interesting question - I hadn't gotten around to checking the numbers yet myself. So,

  Indexes are stored in S3, data is on Glacier
  ~450GB of data stored
  316,189 Requests to upload it all (main cost)
  $17.39 to upload it all
  $5.09 to store it last month (but upload was incomplete)
  Expect closer to $6-$7 to store it this month
  ~$120 to restore it all (that was a back of the napkin figure before I started)
Arq has a number of good things to recommend it. The creator lurks around here, which is always nice to know. The design is very sensible - it's basically a git index on S3 with the data blobs in Glacier. The storage format is open and documented. All the data is encrypted using your own key locally and then pushed to your own AWS account. It works out really cheap if you use Glacier (only planning on restoring in catastrophic circumstances).

It all just works. The interface is easy and intuitive. I pushed my data to the EU region since it's closer. The more I think about it the happier I am with my choice at the moment. Even if I changed my mind and stopped using it - it's nice knowing that for a few dollars a month I have a huge snapshot of my data in a reasonable format in my AWS account.

Re:Dropbox will kill your insane MacBook Air 2013 battery by chrisdevereux on Wednesday July 03, 2013 @06:30AM (#5983559)
FSEvent/NSFilePresenter APIs do the same on OS X. Nobody should be polling for changes to files.
Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @05:29AM (#5983370)
My method is not scientific at all, I agree with that BUT the facts remain: without dropbox on (even after full sync and supposedly idle), my battery life is multiplied by nearly 3.

As a side note, Dropbox behaves differently on OS X. I've never noticed this issue on Windows 8 machines.

Re:Dropbox will kill your insane MacBook Air 2013 battery by rasmuskl on Wednesday July 03, 2013 @05:00AM (#5983273)
One solution to the whole "storing source in dropbox" problem that I liked to use previously (using bitbucket now instead) is just to have a bare git repo in dropbox + the real checkout somewhere else and just push commits to the bare dropbox repo whenever I'm about to switch machine. Could even be set up to happen more automagically since the repo isn't shared.

Syncing binaries (I mainly work in C#) and lots of small changes seems silly to me.

Re:Dropbox will kill your insane MacBook Air 2013 battery by Osmium on Wednesday July 03, 2013 @08:09AM (#5983961)
I switched from Dropbox to SpiderOak recently, and they're a bit better, but feels so clunky. I'm just about fed up with all of them. I use CrashPlan for backups and they're at least good for CPU usage because they have a preference -- max CPU (%) when you're at the computer, and max CPU when you're away, which really does help.

Those who are using Dropbox may find something like cpulimit[1] useful. This limits the CPU usage of any process by repeatedly sending SIGSTOP and SIGCONT signals to your process. It's on homebrew for OS X. I think there're some other alternatives available too but can't remember off hand. But if the article's accurate, Dropbox has issues even when it's not indexing heavily.

[1] https://github.com/opsengine/cpulimit

Re:Dropbox will kill your insane MacBook Air 2013 battery by rsanders on Wednesday July 03, 2013 @09:01AM (#5984203)
A non-open-source OS X app called AppTamer can be very handy for managing battery life. You can set process priority and automatically pause non-foreground GUI apps. So when you switch away from your CPU chewing IDE, it'll get SIGSTOP'd.
Re:Dropbox will kill your insane MacBook Air 2013 battery by waterhouse on Wednesday July 03, 2013 @12:58PM (#5985876)
"I just have to change my habit of having it constantly on while working. Turn Dropbox on and sync before starting to work and then turn it off."

Hohoho. Allow me to suggest a solution. Suppose that you would be ok with having Dropbox sync files every five minutes. Let's suppose that 10 seconds is usually more than enough to do whatever syncing is necessary. Well, then:

  $ while :; do killall -STOP Dropbox; sleep 300; killall -CONT Dropbox; sleep 10; done
I do things like this to throttle the CPU usage and, in some cases, the power consumption of applications that really don't need what they're using. This really should be a feature provided by the operating system, but in the meantime, I resort to ridiculous hacks of this sort. (Note that, if you ^C the above loop, Dropbox will likely be still STOPped and you'll have to CONT it again. It is possible to write a more sophisticated program to address this problem.)
Re:Dropbox will kill your insane MacBook Air 2013 battery by threeseed on Wednesday July 03, 2013 @05:16AM (#5983321)
This happens to me as well.

The Dropbox daemon wakes up every 10-15 seconds, uses 15% of the CPU then goes back to sleep. All this without any files changed or the index being affected. On 10.8, 10.9 with official versions and betas. Noticeable because I am on an older C2D MacBook Pro.

Wondering whether it's a side effect of something else installed e.g. iStat Menus.

Re:Dropbox will kill your insane MacBook Air 2013 battery by nicholassmith on Wednesday July 03, 2013 @05:57AM (#5983445)
This is interesting, I've also got a 2013 MBA and use DropBox but I've not seen a big dip in battery usage. I might do a bit more testing this week and see whether it has had an impact and I've just not realised, and/or I've put it down to the code-compile-simulator cycle.
Re:Dropbox will kill your insane MacBook Air 2013 battery by tluyben2 on Wednesday July 03, 2013 @04:38AM (#5983193)
I see this problem happening only to me when it's used as code repository. Which is what he is doing. I had that for one project because the client didn't want to use git, but it's horrible. So, logically, when you have a lot of files changing all the time (compiling (xcode, eclipse), adding libraries (node, RoR)) you'll see dropbox taking over your computer. For all other uses it seems fine.

Note also that when you have the issue with a lot of small files, during/after dropbox is done, Finder / mds will jump to the top of your top indexing the files. I disabled mds in my projects directory and will never place active source directories in dropbox again.

Re:Dropbox will kill your insane MacBook Air 2013 battery by mtts on Wednesday July 03, 2013 @04:43AM (#5983211)
Well, yes, but if you read the result of his tests even with syncing turned off Dropbox is still eating about 500 mAh.

And that is, I would say, rather strange.

Re:Dropbox will kill your insane MacBook Air 2013 battery by andor on Wednesday July 03, 2013 @06:27AM (#5983550)
I guess the Python interpreter is preventing the CPU from entering lower sleep states.
Re:Dropbox will kill your insane MacBook Air 2013 battery by tluyben2 on Wednesday July 03, 2013 @06:14AM (#5983499)
You are right. That is strange. I never tried turning synching off; I just turn Dropbox off entirely. But is that load not a result of the FS monitoring? Or does that take far less in itself?
Re:Dropbox will kill your insane MacBook Air 2013 battery by watson on Wednesday July 03, 2013 @07:13AM (#5983723)
Can anyone confirm his findings? I imagine that if this is real, then this is a problem for all MacBook owners not just the latest MacBook Air.

I have a 13" MacBook Air, medio 2011. I bought it almost right after it was released and have used it as my only computer almost every day since. I have the Dropbox agent running all the time.

While working last Sunday I got 5.5 hours of battery life out of it and I've never taken good care of the battery. I never drain it unless I'm not near a power outlet, in which case I just have it plugged in all day.

My current battery health information shows: Cycle Count: 253, Condition: Normal

Re:Dropbox will kill your insane MacBook Air 2013 battery by da_maire on Wednesday July 03, 2013 @04:52AM (#5983247)
I have a cron script running on my MacBook to make sure the Dropbox client priority is always set to 20 (lowest). I also pause the client manually when moving to battery power. I really wish there was a better solution, like switching to a similar service that offers decent (or at least acceptable) software, but almost everyone else uses the same setup with terrible 'universal' Java/Python/etc-based clients that absolutely suck at synchronizing large amounts of data.
Re:Dropbox will kill your insane MacBook Air 2013 battery by zurn on Wednesday July 03, 2013 @05:40AM (#5983402)
Laptop operating systems need to start keeping tabs on what's using your battery, like Android does (with mixed success but that's another story).
Re:Dropbox will kill your insane MacBook Air 2013 battery by 9h1d9j809s on Wednesday July 03, 2013 @06:29AM (#5983556)
OS X 10.9 does show battery use per app in the Activity Monitor. It also shows a short list of battery-draining apps right in the battery menu at the top of the screen.
Re:Dropbox will kill your insane MacBook Air 2013 battery by lttlrck on Wednesday July 03, 2013 @09:05AM (#5984218)
Powertop has been available on Linux for a looooong time.
Re:Dropbox will kill your insane MacBook Air 2013 battery by zurn on Saturday July 13, 2013 @05:44PM (#6038896)
Powertop doesn't do that though.
Re:Dropbox will kill your insane MacBook Air 2013 battery by lcnmrn on Wednesday July 03, 2013 @05:44AM (#5983411)
Open Dropbox when you need to sync, then quit the process. Make sure it doesn't run at OS X start up. I don't see why most of the users want to have a perfect sync all day long since it doesn't happen in real time (large files, slow network, etc.)
Re:Dropbox will kill your insane MacBook Air 2013 battery by TheAnimus on Wednesday July 03, 2013 @05:58AM (#5983451)
Oh if only it was one App that killed the battery on the last laptop I bought. Before nuking the default windows install, I did a quick test, with all the crapware that comes as standard, it managed about 4 hours. Fresh install 6.5 hours.
Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @06:50AM (#5983629)
Mac. Doesn't come with crapware.

For Windows boxes, there's decrapifier.

Re:Dropbox will kill your insane MacBook Air 2013 battery by FreezerburnV on Wednesday July 03, 2013 @11:03AM (#5984967)
Doesn't Windows 8 come with a built-in "remove everything and fresh install the OS" button now? Can always use that.
Re:Dropbox will kill your insane MacBook Air 2013 battery by OrdojanAndrius on Wednesday July 03, 2013 @07:20AM (#5983755)
Since I'm stuck using an old computer I made a small script that turns Dropbox on every few hours and kills it after 10 minutes. I don't sync data all the time so this solution works well for me and I save system resources.
Re:Dropbox will kill your insane MacBook Air 2013 battery by Already__Taken on Wednesday July 03, 2013 @09:43AM (#5984410)
I push to a bare repo in a dropbox folder because I can't for the life of me get a secure connection through the work firewalls / proxy so I don't bother and let dropbox deal with it.
Re:Dropbox will kill your insane MacBook Air 2013 battery by diziet on Wednesday July 03, 2013 @05:03AM (#5983280)
Doesn't seem to happen with the latest self-updated version of dropbox and 10.8.4 to such an extreme, on a retina MBP. I get 15 extra minutes.
Re:Dropbox will kill your insane MacBook Air 2013 battery by lord_quas on Wednesday July 03, 2013 @03:46AM (#5983034)
Thats awful, one can only assume this affects MBP as well. I think I'll now only turn DB on whenever I'm on A/C.
Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @04:04AM (#5983088)
Yeah, it sucks big time. DB is at the center of my workflow. Having my git repository in it, my projects plans, etc. I just have to not forget to "turn on, sync, turn off, work, turn on sync, turn off".

On the other hand, I didn't notice any difference in battery consumption on my Windows 8 laptops. Who knows, maybe OS X Mavericks will change that with the way it handles processes?

Re:Dropbox will kill your insane MacBook Air 2013 battery by 9h1d9j809s on Wednesday July 03, 2013 @06:25AM (#5983541)
I have noticed this as well. And it's not just Dropbox. I have turned off Dropbox, Google Drive and Little Snitch.
Re:Dropbox will kill your insane MacBook Air 2013 battery by czottmann on Wednesday July 03, 2013 @05:21AM (#5983342)
Which Dropbox client version are we talking about?
Re:Dropbox will kill your insane MacBook Air 2013 battery by nicoschuele on Wednesday July 03, 2013 @05:25AM (#5983354)
As it is a fresh install, the last one.
Re:Dropbox will kill your insane MacBook Air 2013 battery by czottmann on Wednesday July 03, 2013 @07:58AM (#5983903)
v2.2.8, then. Thanks.