I read on the HFS Plus Wikipedia page that the default sector size on a Mac is 512 b. However, I also read that Macs support 4kb sectors. How can I determine which I have, 512 b or 4 kb sectors? I think 512 is the right answer, but I would like to be sure.
In terminal, you can use diskutil to get information about the drive, including the device block size:
With the older HFS file system, Apple's second attempt at a file system for the Macintosh, there could only be up to 65,535 allocation blocks on a disk. The block size was a function of the disk size in bytes divided by the maximum number of allocation blocks, 65,535. For small disks this was fine, but when disk sizes started to approach 1GB in size the minimum allocation block size was 16 KB (1073741824 / 65535) = 16384.25, but you need to truncate to 16384.
What this means is that a 1 byte file on a 1GB HFS disk required 16,384 bytes to store on the hard drive, so there was too much wasted space. So Apple created the HFS+ wrapper to reduce the wasted space.
There may be a way to set the block size higher, but why would you want to?
Here is a quick bash script that will list all of the diskinfo output for all of your currently connected disks.