You are not logged in.

#1 2012-11-13 15:50:07

iSma
Member
Registered: 2012-11-13
Posts: 4

Need advice: Arch on Asus UX32VD

Hello everyone!

I'm rather new to Arch Linux (I've been using Ubuntu for a while) and have tried some installs on VirtualBox, and I now feel ready to bring Arch onto a real computer! As I'm gonna buy a new laptop soon (an Asus UX32VD), I thought why not make it my first Arch PC?

But before I adventure myself on unkown territory, I have some questions to ask, just to make sure I get everything right on the first try.

First off, the laptop comes with 4GB of RAM, a 24GB SSD + 500GB HDD. I will upgrade the HDD to a 256GB SSD and increase the RAM to 10GB. With this much RAM, do I need a swap partition? If I understand correctly, suspend-to-disk basically copies the RAM to swap, so I need at least 10GB of swap?

What is the best way to partition my SSDs? I wanted to put the EFI system partition, swap and / on the 24GB; /home and a Windows partition on the 256GB. But I'm afraid of two things: swap will wear the small SSD out quickly and 13-14GB for / seems a bit small... Another possibility would have been to put both SSDs in a btrfs "RAID", but I'm not sure it is such a great idea...

Apart from that, can you link me to some guides on how to install a complete system (with a DE, and everything needed for a day-to-day use)? The Beginner's Guide is very well-written and thourough, abd the information it lacks is almost always present in the wiki, but what bugs me is that there are sometimes many different alternatives to choose from, but no indications on the differences between these choices and what their implications are. For example netcfg, NetworkManager and Wicd.

Anyways, I hope I didn't bother anyone with all my questions and that they're posted in the right place. Thanks in advance for your time!

iSma

Offline

#2 2012-11-13 16:39:45

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: Need advice: Arch on Asus UX32VD

Suspend to disk needs swap. Due to some optimizations in the kernel probably not exactly as much as you have RAM, but to be on the safe side, it should be as much as you have RAM. You will find articles which suggest to increase the size of swap beyond that of RAM to cover for bad sectors.

May I ask why you replace the hdd with another ssd? If you keep the hdd, you could place swap, /var and /home on the hdd and therefore reduce wearing of the ssd (/tmp is per default in RAM). The ssd would only be used for the root filesystem  (except /var) and 24 GB would be enough for that.

Offline

#3 2012-11-13 17:22:53

iSma
Member
Registered: 2012-11-13
Posts: 4

Re: Need advice: Arch on Asus UX32VD

Thank you for your response! I actually have an SSD lying around and don't know what else I could do with it. Plus, I'll get some extra battery life out of it (and more performance). So I'll probably put swap, /home and /var on the bigger SSD (I heard the larger an SSD is, the less it's prone to wear)

Offline

#4 2012-11-13 17:28:00

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: Need advice: Arch on Asus UX32VD

iSma wrote:

So I'll probably put swap, /home and /var on the bigger SSD (I heard the larger an SSD is, the less it's prone to wear)

That is true, because the ssd will distribute the blocks internally and make sure that every area of the ssd is used approximately the same.

You may wish to read this about swap and ssd's:

https://wiki.archlinux.org/index.php/SS … ce_on_SSDs

It may be a good idea to reduce swappiness as far as possible.

Offline

#5 2012-11-13 18:02:42

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Need advice: Arch on Asus UX32VD

WARNING! ...wall of text coming at you....

Keep in mind that typicaly mSATA ports are SATA II, as laptops usually use one SATA III port for the HDD bay and the other for the optical/ultrabay.  Mobile mobos usually have 2 SATA III and 4 SATA II ports. So my Mushkin Atlas mSATA runs at SATA II, but my Samsung 830 runs at SATA III.  So I really just use the mSATA port for extraneous storage. 

I use LVM so that I can span my home partition from my Samsung to my Mushkin.  This is super convenient. I tried btrfs, and it was great, the features were awesome and everything.  But putting the drives into a raid array actually resulted in a very similar speed to the Samsung on its own.  I think this is because a RAID array is limited by the slowest drive in the array.  I could have done LVM in a striped array as well, but chose to just let it span in a JBOD fashion.

Ultimately, the way you set your partitions up is going to be your choice.  I will also say that if you have never gone through the process of determining the right layout for you, you will definiteyl not get it right the first time.  You may get a usable setup, but if you are a tinkerer at heart, you will likely not be totlaly satisfied with your setup.  This is another reason why I use LVM.  I can set my partitions up to be super small, and then expand them as necessary.  This is a good reason to use something withonline resizing.  I personally choose ext4, but there are others that would fit this bill. 

If you end up using btrfs, you should not use LVM.  I think I read somewhere (which I cannot find now) that says there is a performance hit with btrfs and LVM, and also all the features of LVM are provided by btrfs natively.  I did like the idea that with btrfs, you simply create subdirectories, and don't have to worry about partition sizing.  They jsut expand as needed.  But because of this, is is very hard to get an accurate read of how much disk space is being used.  Also, the native btrfs snapshot feature is awesome.  I get teh same thing with LVM, but it jus seemed so much better implemented with btrfs.

One more thing, I tried using lzo compression with btrfs on my Samsung, since it does not rely on compression (like Sandforce controllers).  This worked out well, but I saw my battery time go way down.  In fact, I saw higher levels of power consumption without the compression.  I cannot say precisely what it is caused by, but I suspect that it might have been the real time checksumming (this is pure speculation!).

So all in all, if it were me and I didn't have to worry about battery life, I would use a single btrfs partition (excluding /boot of course) and use the subvolume feature to create "partitions".  Then use "compress=lzo" mount option, and experience the awesomeness.  But sine you are using a laptop, I would recommend using LVM with ext4.  Just be sure to use something that supports TRIM, and either mount with the discard option, or set up an anacron job to issue fstrim to all necessary mount points.

Oh yeah, and the swap thing.  Use a swap file,  it is much better in its flexability.  You can easily resize or remove it.  Though if you end up using LVM, you can do this pretty easily as well.  If you end up with btrfs, do not use a swap file, as you will likely end up with filesystem corruption. 

Oh yeah, keep in mind that btrfs does not have a fsck that conforms to the fucntionality held by other fsck utilities.  So if you want your initramfs to fsck your partitions on boot, this is not yet possible with btrfs.  Though with the btrfs snapshot feature, you could implement a snapshotting before updates to roll back if sh*t goes awry.

Last edited by WonderWoofy (2012-11-13 18:03:22)

Offline

#6 2012-11-13 18:54:31

iSma
Member
Registered: 2012-11-13
Posts: 4

Re: Need advice: Arch on Asus UX32VD

That was very informative wall of text, thanks a lot! Especially the part about compression. I had initially planned on using lzo compression, but now that I know how it impacts battery life, I'll reconsider it. Btrfs looks really cool, but your idea of LVM+ext4+swapfile looks much safer and stable, and as I'm gonna use this laptop for important stuff, I don't want to take too much risk. Is there a reason why a swapfile might corrupt a btrfs partition? That's kind of scary...

Offline

#7 2012-11-14 02:27:39

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Need advice: Arch on Asus UX32VD

I Think it has something to do with copy-on-write.  Oh wait, I found it.  This is from the btrfs FAQ. 

Does btrfs support swap files?
Currently no. Just making a file NOCOW does not help, swap file support relies on one function that btrfs intentionally does not implement due to potential corruptions. The swap implementation relies on some assumptions which may not hold in btrfs, like block numbers in the swap file while btrfs has a different block number mapping in case of multiple devices. There is a patchset (swap-over-nfs) which enhances the swapfile API and btrfs could build swap support on top of the infrastructure. The patchset has been merged into 3.6.

That page is really informative.  I think that btrfs is a very viable option still, though I have been enjoying my LVM+ext4 setup.  Even without the compression, it is still a pretty efficient filesystem, and the features seem pretty endless.  Personally though, I just value battery life too much to justify the use of btrfs at this point.  I think in the future I may try it again, but for now I am pretty satisfied with my setup. 

Oh and I think I should mention, that I was mounting all my partitions with discard, until I read somwhere that this greatly increased the time it takes to delete a file (which makes sense since it is zeroing out the unused blocks).  So I tested, and sure enough, it was much faster without.  So I have gone the way of adding an anacron job to fstrim /, /var, and /home (/boot is vfat, so I still have to mount it with the discard option, as fstrim does not seem to work on it).  This is done quite easily, as I figure once a day is enough, I just made a quick ~10 line script in /etc/cron.daily to handle this with the lowest nice and ionice values.  I think that along with a ck kernel, and I don't evne notice that it is happening.

Last edited by WonderWoofy (2012-11-14 02:28:12)

Offline

#8 2012-11-15 15:50:00

iSma
Member
Registered: 2012-11-13
Posts: 4

Re: Need advice: Arch on Asus UX32VD

I'll have to check the btrfs FAQ, I might learn a thing or two. Is there really a difference in battery usage between your LVM+ext4 setup and a btrfs partitioning?

In the end I think I'll try out both options and see what I like better, I think that's how Arch works. I'm slowly getting used to it, and I like it, even if it takes me a bit too much time!

Thank you for your insight!

Offline

Board footer

Powered by FluxBB