On 04/02/2017 17:18, the...@sys-concept.com wrote:
> On 02/04/2017 01:20 AM, J. Roeleveld wrote:
>> On February 4, 2017 8:22:45 AM GMT+01:00, the...@sys-concept.com wrote:
>>> On 02/03/2017 11:19 PM, Dale wrote:
>>>> the...@sys-concept.com wrote:
>>>>> I've not install Gentoo for some time and have some questions.
>>>>>
>>>>> It is Solid State Disk 1TB
>>>>> I'm using Minimal CD (Bootable USB)
>>>>> Created three partition (I did not create SWAP as I have 16GB or
>>> RAM)
>>>>> I used "fdisk" and follow the instruction from:
>>>>> https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks
>>>>>
>>>>> Though, I'm a bit confused. I did not see the change root command in
>>>>> those instructions.
>>>>> Right now I have a prompt: "livecd ~ #"
>>>>>
>>>>> and all instruction on the installation page showing: "root #"
>>>>>
>>>>> I've created a user: "livecd ~ #useradd -m -G users john"
>>>>> Will it take effect I'm still inside "livecd" environment.
>>>>>
>>>>> I'm confused a bit.
>>>>
>>>>
>>>> It's been a while since I did a install as well plus I'm old as well.
>>> I
>>>> skimmed your link and don't think you should be creating a user at
>>> that
>>>> point.  If I recall correctly, creating users is done shortly before
>>>> rebooting into the new install or even after rebooting.  Usually, I
>>> do
>>>> it after rebooting.  Generally, I'm more concerned with my new kernel
>>>> booting etc rather than having a user account, besides root of
>>> course. 
>>>> Do set the root password BEFORE booting into the new install.  It
>>> makes
>>>> life easier.  ;-) 
>>>>
>>>> The chroot command usually comes shortly after downloading and
>>> unpacking
>>>> the stage3 tarball.  Until you have that, you don't have anything to
>>>> chroot into yet. 
>>>>
>>>> I might add, I like a all in one page guide.  For me, it seems easier
>>> to
>>>> scroll down, do what is there, scroll down some more etc.  It being
>>> in
>>>> sections may be easier for you tho.  Use what works.  Also, I read
>>> over
>>>> the guide at least twice before I start.  The first time I did a
>>> Gentoo
>>>> install, I read it half a dozen times in some spots. 
>>>>
>>>> Hope that helps.
>>>>
>>>> Dale
>>>>
>>>> :-)  :-) 
>>>
>>> Thanks Dale, that new installation is not going well.
>>> I've change the environment and my prompt is still: "(chroot) livecd
>>> /#"
>>>
>>> emerge --sync gives me error:
>>> "/etc/portage/make.conf", line 11: Invalid variable name
>>> '-Wl,--hash-style'
>>>
>>> Line 11 in make.conf:
>>> USE="-qt4 -hal -arts -berkdb -acl X gtk dvd alsa cdr cups apache2 ssl
>>> foomaticdb truetype kpathsea ppds mysql udev java tiff png usb  scanner
>>> gimp gimpprint cgi fam nptl t$
>>>
>>> Here is complete make.conf
>>>
>>> CFLAGS="-march=native -O2 -pipe
>>> CXXFLAGS="${CFLAGS}"
>>> #LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu"
>>> MAKEOPTS="-j9"
>>>
>>> USE="-qt4 -hal -arts -berkdb -acl X gtk dvd alsa cdr cups apache2 ssl
>>> foomaticdb truetype kpathsea ppds mysql udev java tiff png usb  scanner
>>> gimp gimpprint cgi fam nptl t$
>>>
>>> CHOST="x86_64-pc-linux-gnu"
>>> CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a "
>>>
>>> PORTDIR="/usr/portage"
>>> DISTDIR="${PORTDIR}/distfiles"
>>> PKGDIR="${PORTDIR}/packages"
>>>
>>> INPUT_DEVICES="evdev"
>>> LINGUAS="en"
>>> L10N="en"
>>> FEATURES="parallel-fetch strict fixlafiles"
>>> #VIDEO_CARDS="fglrx radeon"
>>> #VIDEO_CARDS="nvidia nouveau"
>>> #SANE_BACKENDS="epson2"
>>> #PHP_TARGETS="php5-5 php5-6"
>>> #PHP_INI_VERSION="production"
>>> ACCEPT_LICENSE="${ACCEPT_LICENSE} googleearth PUEL dlj-1.1
>>> Oracle-BCLA-JavaSE"
>>>
>>> EMERGE_DEFAULT_OPTS="--autounmask-write=y --keep-going --with-bdeps=y
>>> --jobs 3"
>>>
>>> GENTOO_MIRRORS="http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/
>>> http://gentoo.osuosl.org/
>>> ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/
>>> http://linux.rz.ruhr-uni-b$
>>>
>>> PORTAGE_TMPDIR="/var/tmp"
>>> PORTAGE_TMPFS="/dev/shm"
>>> PORTAGE_NICENESS=3
>>> AUTOCLEAN="yes"
>>>
>>> Why isn't "emerge --sync" working?
>>> It seems to me the chroot did not work correctly.
>>>
>>> This new manual is not compete and/or accurate :-/
>>>
>>> --
>>> Thelma
>>
>> Please sanitize your make.conf file.
>> I am seeing some lines ending with $.
>> Not all lines have the closing quotes.
>>
>> Your global USE flags contain some that no longer exist (Dale's favourite 
>> "hal" being one of them :)  )
>>
>> Also, I have 32GB ram in my desktop and I do have a swap partition. When I 
>> am working, it does get used.
>> Software keeps using more memory. So do 27 cc jobs (jobs 9 for make and jobs 
>> 3 for emerge).
>>
>> I would re-condiser not using swap unless you are certain you will never 
>> need more than 16gb. (Eg. No graphical desktop running a few webbrowsers)
>>
>> --
>> Joost
> 
> You might be correct, I'm reinstalling from fresh today so I'll put SWAP
> back.  Question, how much swap should I allocate?  Isn't the unwritten
> rule RAM * 2 so 32GB of swap partition? or RAM * 1.5


Size of swap is the classic cargo-cult question, and most folks are
blindly going along with twice total ram - a rule-of-thumb that has been
around for 20 years and seldom questioned.

Why twice ram? Can anyone show me the workout where this achieves an
optimal result? The plain answer is no, no-one can show that because
it's not a rule, it was never worked out by someone with clue and it's a
guideline that someone sucked out of their thumb.

It started back in the day when 16M was a *lot* of memory, and services
like Apache would stress 16M quite a lot (it only takes a few hits of
very big pages to come close to running out of ram). So someone figured
out that 32M swap was a good compromise; it's about 5-10% of the size of
disks we had back then and 32M is read back from an MFM drive fast
enough that the user doesn't get impatient waiting. I'm not making this up!

Move forward to the present day.
What happens when you run out of RAM? You get an out-of-memory error
that a decent app will handle gracefully.
What happens when you have swap and run out of RAM? The kernel starts to
use disk, and goes krunch krunch krunch very slowly for quite a while,
and then you get an out-of-memory error that a decent app will handle
gracefully...
Plus usually when an app starts thrashing to disk, the kernel starts to
struggle mightily and a runaway process starts where slow access causes
more things to swap, which makes even more swap, and then the system
runs out of memory anyway

So why are you using swap at all these days with 16G being common? Do
people have any concept how much memory that is, and what it takes to
fill it? (I've only managed to achieve that with dodgy flash apps on
dodgy sites...)

My advice is to not use swap. Yes, it is counter-intuitive and yes it
goes against the advice you see all over the internet from 1996, and
many people will swear blind that twice ram is perfect ad are terrified
to say otherwise because then they will have been wrong. But I can show
that the advice is cargo-culted and I can show that no-one can defend
that advice. The solution to running out of memory is to get more RAM
(or fix the app that leaks).

Modern kernels DO get nervous if they have no swap at all - it's used
internally. So make a small amount of swap to make the kernel happy, say
64M or so. Yes, megs.

And if your machine sleeps to disk you will need swap large enough to
store the memory image - it has to go somewhere and that is swap.

That's my advice. Now let the nay-sayers begin the argument


-- 
Alan McKinnon
alan.mckin...@gmail.com


Reply via email to