By subject, mainly.
Since relocating cross-country about 4 years ago, I reduced my collection from about 200 linear feet down to maybe 140—discarding mostly periodicals. Most of my books are non-fiction, thus easily classified by subject. My fiction shelves have some space for “classics” stuffed at random, with the rest more-or-less chronological. I group biographies together at random.
If your shelves allow customizing vertical height, there’s some economy in grouping short and tall books on separate shelves. I keep oversize books (too tall for any other shelf) in one place and just remember that they’re there.
I try to leave space for new acquisitions yet inevitably must rearrange things (who’s got the time?) then still run out of room, resorting to placing books horizontally on top of the vertical ones. Similar to how adding new lanes to freeways never seems to improve traffic congestion. But that’s not the sad part.
What’s sad is that the entire library (that is, my book collection) is heading for obsolescence. This already happened to my vinyl records & music CDs, and soon DVDs etc—everything is (or should be) going online. Future generations will thank us for our sacrifice…
Working at home I used to consult my personal library frequently for explanations, clarifications, or to check facts. Now I do practically all of that online. Not that books themselves are obsolete, but I think amassing a personal physical library of books (even if you regard some of them as “old friends”) is increasingly pointless.