swap partition leads to instability?

2013-05-26 Thread M. V.
hi everyone,

I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD drive. it's 
partitioned as normal (/ , /tmp, /var , /usr and swap) for a long time now. But 
recently I heard from a FreeBSD expert that I shouldn't have swap partition for 
my server, and having swap partition could make my server unstable. this was so 
strange for me, and I searched a lot but couldn't find a reason for this claim.


so my question is simple:
- could having a swap partition, be a bad thing for my FreeBSD server? and if 
so, why and in what conditions?


Cheers!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Erich Dollansky
Hi,

On Sun, 26 May 2013 01:58:32 -0700 (PDT)
M. V. bored_to_deat...@yahoo.com wrote:

 I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD drive.
 it's partitioned as normal (/ , /tmp, /var , /usr and swap) for a
 long time now. But recently I heard from a FreeBSD expert that I
 shouldn't have swap partition for my server, and having swap
 partition could make my server unstable. this was so strange for me,
 and I searched a lot but couldn't find a reason for this claim.
 
because it is a false claim. I never ever have had any system with
working hard, that gave a problem because of the swap space.

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Polytropon
On Sun, 26 May 2013 16:09:06 +0700, Erich Dollansky wrote:
 Hi,
 
 On Sun, 26 May 2013 01:58:32 -0700 (PDT)
 M. V. bored_to_deat...@yahoo.com wrote:
 
  I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD drive.
  it's partitioned as normal (/ , /tmp, /var , /usr and swap) for a
  long time now. But recently I heard from a FreeBSD expert that I
  shouldn't have swap partition for my server, and having swap
  partition could make my server unstable. this was so strange for me,
  and I searched a lot but couldn't find a reason for this claim.
  
 because it is a false claim. I never ever have had any system with
 working hard, that gave a problem because of the swap space.

I think the problem here is that he's using a SSD.
As soon as the swap partition is being in heavy use,
which means it receives many writes, this may lead
to the SSD wearing out, decreasing its lifetime.

Swap space usually does not make a system unstable.
Sometimes, the opposite is true. :-)

So if you're using a SSD, you can apply certain
optimizations to increase its lifetime so it can be
in use for several years (running 24/7). Here are
some suggestions -- check if they are useful in your
specific case!

# newfs -m 0 -i 16384 -b 16384 -f 2048 -U /dev/ada0a

This assumes that you don't have created any
slices, just one bootable partition covering the
whole disk (therefor ada0a).

Create a swapfile like this:

# /bin/rm -f /swapfile.tmp
# /bin/dd if=/dev/zero of=/swapfile.tmp bs=16m seek=1k count=0
# /sbin/mdconfig -a -t vnode -u 0 -f /swapfile.tmp || /bin/sh
# /bin/chflags nodump /swapfile.tmp
# /bin/rm -f /swapfile.tmp
# /sbin/swapctl -a /dev/md0

This makes the system use a disk-backed dynamic
swap file. If the swap won't be used, no space will
be occupied or reserved on the SSD.

You can also think about changing stuff you won't
need to store on the SSD, maybe some content of /tmp
or /var. You can also put those into a memory disk.

The SSD rule is: Minimize writes if you can. This is
a _general_ rule and does not correspond to swap only!





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Eduardo Morras
On Sun, 26 May 2013 01:58:32 -0700 (PDT)
M. V. bored_to_deat...@yahoo.com wrote:

 hi everyone,
 
 I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD drive. it's 
 partitioned as normal (/ , /tmp, /var , /usr and swap) for a long time now. 
 But recently I heard from a FreeBSD expert that I shouldn't have swap 
 partition for my server, and having swap partition could make my server 
 unstable. this was so strange for me, and I searched a lot but couldn't find 
 a reason for this claim.
 
 
 so my question is simple:
 - could having a swap partition, be a bad thing for my FreeBSD server? and 
 if so, why and in what conditions?

I never had a problem with swap partitions, but perhaps the FreeBSD expert may 
refer to one of this three issues I can think about problems with swap, none of 
them are unstability issues:

a) Swap partitions may store info from previous boot, you can use swap 
encryption for that.
b) When using swap files (mounting a swap in a file), at shutdown sometimes 
there's a race condition and swap is unmounted before it's empty.
c) If your system needs to use swap, network apps may show/throw timeouts when 
swap i/o is heavy.

Sometimes b) kicks me but it's my fault because i don't shutdown process 
properly.

 
 Cheers!

L

---   ---
Eduardo Morras emorr...@yahoo.es
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Erich Dollansky
Hi,

sorry for my English. Here is what I wanted to say.

On Sun, 26 May 2013 16:09:06 +0700
Erich Dollansky erichsfreebsdl...@alogt.com wrote:

 Hi,
 
 On Sun, 26 May 2013 01:58:32 -0700 (PDT)
 M. V. bored_to_deat...@yahoo.com wrote:
 
  I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD
  drive. it's partitioned as normal (/ , /tmp, /var , /usr and swap)
  for a long time now. But recently I heard from a FreeBSD expert
  that I shouldn't have swap partition for my server, and having swap
  partition could make my server unstable. this was so strange for me,
  and I searched a lot but couldn't find a reason for this claim.
  
 because it is a false claim. I never ever have had any system with
 working hard, that gave a problem because of the swap space.

I never ever have had any system which was working hard that gave
problems because of the swaps space.

Erich
 
 Erich
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Matthew Seaman
On 26/05/2013 09:58, M. V. wrote:
 hi everyone,
 
 I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD drive. it's 
 partitioned as normal (/ , /tmp, /var , /usr and swap) for a long time now. 
 But recently I heard from a FreeBSD expert that I shouldn't have swap 
 partition for my server, and having swap partition could make my server 
 unstable. this was so strange for me, and I searched a lot but couldn't find 
 a reason for this claim.
 
 
 so my question is simple:
 - could having a swap partition, be a bad thing for my FreeBSD server? and 
 if so, why and in what conditions?

Having a swap partition is absolutely standard for server or workstation
class machines, and should be implemented as a matter of course.  Even
if the machine has much more memory than it would generally ever use and
so have no actual need to swap.

About the only circumstances where you wouldn't want swap is if you were
creating an embedded appliance and eg. didn't have any writable disk
space.  That's pretty extraordinary and as such a system would have to
be heavily customized over stock FreeBSD anyhow, so not having swap
would fade into insignificance compared to the other changes that would
be required.

Why is swap needed?  Nowadays, memory is sufficiently cheap and system
boards are capable of loading so much of it, that the only sensible
strategy is to have more physical RAM than is required to keep your
normal application load working.  So a swap partition should not be
routinely involved in swapping memory pages back and forth.

Even so, idle pages can be swapped out -- there's no point in having an
unreferenced memory page sitting in RAM taking up space that could be
used productively by an active process.  A small amount of swap usage
like this is standard.  A large amount of swap usage like this indicates
you need to switch to using better written software.

Swap is also useful to buffer against unexpected spikes in memory usage.
 Sure, performance generally nosedives once a system starts actively
swapping, but that may be a better outcome than the alternative if there
is no swap capacity available: which is for the kernel to start killing
off processes in an attempt to reduce memory pressure.

Finally, swap is used as the place to record kernel state in the event
of system crashes.  You could use any otherwise unused disk partition
for that, but swap is traditional.  This is where the hoary old recipe
of 'swap = twice ram' came from, although nowadays what with minidumps
and the generally larger amounts of RAM in use you don't need to provide
anything like as much as that.

If you're bothered by having a few GiB of disk allocated as swap but
basically idle, then look into tmpfs or mdmfs for /tmp -- that will let
you make productive use the space while still keeping the ability to
save crashdumps if needed.

Some caveats about where to put a swap area:

   * If your system is under memory pressure, then your swap area can be
extremely active.  In these circumstances putting swap on a SSD card or
other device with a limited number of write-cycles is not a good choice.

   * If you are using ZFS, and again, if you are under memory pressure,
then putting swap on a ZFS can lead to a deadlock where the system needs
to allocate more memory to deal with an out-of-memory condition.  In
this case, it is recommended to create a separate swap partition not
managed by ZFS.

Otherwise, swap can go anywhere.  A dedicated partition will give better
performance than swapping to a file, but file-backed swap is handy if
you need to add swap in a hurry.

For resilience, mirror swap partitions in pairs -- gmirror(8) is a good
tool for that.  Don't try using any of the higher RAID levels for swap
areas -- their performance characteristics are not a good match to the
sort of IO a swap area does.

For best performance, you should spread swap areas over as many disk
spindles as possible.  You can create numerous swap areas and the system
will automatically stripe any IO across them.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc
Description: OpenPGP digital signature


How to switch Datgram/Connected mtu modes?

2013-05-26 Thread Alex Liptsin
Hello.

I work with FreeBSD 9.1 and Mellanox devices.

How can I configure MTU in connected mode on FreeBSD 9.1?
In Linux to enable connected mode for interface ib0, I enter:

   echo connected  /sys/class/net/ib0/mode



Switching between CM and UD mode can be done in run time:

   echo datagram  /sys/class/net/ib0/mode sets the mode of ib0 to UD

   echo connected  /sys/class/net/ib0/mode sets the mode ib0 to CM

There is no such directories at FreeBSD. Wat shall I do?



Datagram vs Connected modes

  The IPoIB driver supports two modes of operation: datagram and
  connected.  The mode is set and read through an interface's
  /sys/class/net/intf name/mode file.

  In datagram mode, the IB UD (Unreliable Datagram) transport is used
  and so the interface MTU has is equal to the IB L2 MTU minus the
  IPoIB encapsulation header (4 bytes).  For example, in a typical IB
  fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes.

  In connected mode, the IB RC (Reliable Connected) transport is used.
  Connected mode takes advantage of the connected nature of the IB
  transport and allows an MTU up to the maximal IP packet size of 64K,
  which reduces the number of IP packets needed for handling large UDP
  datagrams, TCP segments, etc and increases the performance for large
  messages.

  In connected mode, the interface's UD QP is still used for multicast
  and communication with peers that don't support connected mode. In
  this case, RX emulation of ICMP PMTU packets is used to cause the
  networking stack to use the smaller UD MTU for these neighbours.

Thanks a lot

Regards,
Alex Liptsin
Office: +972 (74) 7236141
Mobile: +972(54) 7833986
Fax: +972(74) 7236161
Email: al...@mellanox.commailto:al...@mellanox.com

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


a copy of ASL dump for acer aspire laptops models

2013-05-26 Thread Xavier
Hi everyone,

I need a copy of ACPI Source Language (ASL), '# acpidump-dt
copy_model_laptop.asl' of any version of FreeBSD you have the option
ACPI always enabled and does not give any problem on ACER laptops.

Anyone can send me a copy of your ASL dump ( see above ) of ACER
ASPIRE laptops model?

Thanks, see you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread jb
M. V. bored_to_death85 at yahoo.com writes:

 
 hi everyone,
 
 I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD drive. it's
partitioned as normal (/ , /tmp,
 /var , /usr and swap) for a long time now. But recently I heard from a
FreeBSD expert that I shouldn't have
 swap partition for my server, and having swap partition could make my
server unstable. this was so strange
 for me, and I searched a lot but couldn't find a reason for this claim.
 
 so my question is simple:
 - could having a swap partition, be a bad thing for my FreeBSD server?
and if so, why and in what conditions?
 
 Cheers!

Hi,

I think your FB expert was up to something. I bet he spoke out of experience.

Swapping by itself can decrease system reliability due to possible data
corruption on swap disk or during two-way transfers, with subsequent incorrect 
RAM and machine crash.

But, swapping is also a symptom, not a problem.
It is never a good idea to let it get to that point.
Badly written, architected, or tuned server app or system are the reason.
Think of RDBMS/SQL server processing real-time on-line transactions and how 
much it goes into setting it up properly for a heavy use.
On a smaller scale, consider this example:
http://blog.jcole.us/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/

jb


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: a copy of ASL dump for acer aspire laptops models

2013-05-26 Thread Julian H. Stacey
Hi, Reference:
 From: Xavier xavierfreebsdquesti...@gmail.com 
 Date: Sun, 26 May 2013 14:21:04 +0200 

Xavier wrote:
 Hi everyone,
 
 I need a copy of ACPI Source Language (ASL), '# acpidump-dt
 copy_model_laptop.asl' of any version of FreeBSD you have the option
 ACPI always enabled and does not give any problem on ACER laptops.
 
 Anyone can send me a copy of your ASL dump ( see above ) of ACER
 ASPIRE laptops model?
 

Hi,
I have an acer/aspire/5741  no problems I'm aware of, so will send you mine.

uname -a
FreeBSD lapr.js.berklix.net 9.1-RELEASE FreeBSD 9.1-RELEASE
#3: Tue Apr  9 14:33:17 CEST 2013
j...@lapr.js.berklix.net:/sys/amd64/compile/LAPR.small  amd64

I'm not sure what you mean at
you have the option ACPI always enabled and does not give any problem
however,
sysctl -a | grep -i acpi 
does show
device  acpi
 136 lines in total,

acpidump -dt produces 15,840 lines, 
so I'll not append to list but private mail you.

Anything else you need ? What's wrong ? What you are you chasing ?

PS mob...@freebsd.org or a...@freesbd.org would be better  best lists 
   for this, not questions@.
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
so I added cc: freebsd-a...@freebsd.org

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com
 Reply below not above, like a play script.  Indent old text with  .
 Send plain text.  No quoted-printable, HTML, base64, multipart/alternative.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: a copy of ASL dump for acer aspire laptops models

2013-05-26 Thread Julian H. Stacey
Hi Xavier cc questions@  acpi@

I wrote: 

 acpidump -dt produces 15,840 lines, 
   so I'll not append to list but private mail you.

I put it here so others on acpi@  questions@ can look too if they want.
http://berklix.com/~jhs/hardware/laptops/acer/aspire/5741/

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com
 Reply below not above, like a play script.  Indent old text with  .
 Send plain text.  No quoted-printable, HTML, base64, multipart/alternative.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE:

2013-05-26 Thread asrofibcllamongan

Gustav%20Linde399 http://spsp2.free.fr/w/52Clare%20Lanman230 Mon, 27 May 2013 
20:27:12

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Gateway on downloads

2013-05-26 Thread Jos Chrispijn

Hi all,

 netstart -rn (partitially)

DestinationGatewayFlagsRefs  Use Netif Expire
default10.10.10.100   UGS 0   858468 re0

Can you tell me how I can force _any_download from my server not going 
via 10.10.10.100 but to another gateway number 10.10.10.200?
For incoming uploads (ftp) and domain requests (Apache) still to keep 
10.10.10.100 for incoming traffic.


I have NZBGet installed and want to use the 2nd gateway (triple time the 
1st gateway speed) on downloads.
Maybe there is a way on ftp/download requests to redirect certain 
destination IP's to be switch through another network gateway IP?


Thanks,
Jos Chrispijn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Michael Sierchio
The Intel SLC mSATA drives I use in embedded devices don't support TRIM,
but - it doesn't seem to matter.  Actually, I'm confident that just using
bare partitions for swap is fine, and I haven't had any of the trouble I
witnessed with MLC devices.  The difference is that the size is limited to
under 32GB.

- M


On Sun, May 26, 2013 at 4:32 PM, Warren Block wbl...@wonkity.com wrote:

 On Sun, 26 May 2013, Polytropon wrote:

  On Sun, 26 May 2013 16:09:06 +0700, Erich Dollansky wrote:

 Hi,

 On Sun, 26 May 2013 01:58:32 -0700 (PDT)
 M. V. bored_to_deat...@yahoo.com wrote:

  I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD drive.
 it's partitioned as normal (/ , /tmp, /var , /usr and swap) for a
 long time now. But recently I heard from a FreeBSD expert that I
 shouldn't have swap partition for my server, and having swap
 partition could make my server unstable. this was so strange for me,
 and I searched a lot but couldn't find a reason for this claim.

  because it is a false claim. I never ever have had any system with
 working hard, that gave a problem because of the swap space.


 I think the problem here is that he's using a SSD.
 As soon as the swap partition is being in heavy use,
 which means it receives many writes, this may lead
 to the SSD wearing out, decreasing its lifetime.


 Another problem with SSDs is that they can have difficulty with wear
 leveling.  This is even worse with swap because there is no way to use TRIM
 to tell the SSD about blocks that have been freed.

 The workaround is a swapfile on UFS with TRIM enabled.  It works fine, and
 even better when you update the rc scripts for shutdown.

 Here's an article on setup:
 http://www.wonkity.com/~**wblock/docs/html/ssd.htmlhttp://www.wonkity.com/~wblock/docs/html/ssd.html

 And here is the PR with a patch:
 http://www.freebsd.org/cgi/**query-pr.cgi?pr=bin/168544http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/168544

 __**_
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-**
 unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Warren Block

On Sun, 26 May 2013, Polytropon wrote:


On Sun, 26 May 2013 16:09:06 +0700, Erich Dollansky wrote:

Hi,

On Sun, 26 May 2013 01:58:32 -0700 (PDT)
M. V. bored_to_deat...@yahoo.com wrote:


I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD drive.
it's partitioned as normal (/ , /tmp, /var , /usr and swap) for a
long time now. But recently I heard from a FreeBSD expert that I
shouldn't have swap partition for my server, and having swap
partition could make my server unstable. this was so strange for me,
and I searched a lot but couldn't find a reason for this claim.


because it is a false claim. I never ever have had any system with
working hard, that gave a problem because of the swap space.


I think the problem here is that he's using a SSD.
As soon as the swap partition is being in heavy use,
which means it receives many writes, this may lead
to the SSD wearing out, decreasing its lifetime.


Another problem with SSDs is that they can have difficulty with wear 
leveling.  This is even worse with swap because there is no way to use 
TRIM to tell the SSD about blocks that have been freed.


The workaround is a swapfile on UFS with TRIM enabled.  It works fine, 
and even better when you update the rc scripts for shutdown.


Here's an article on setup:
http://www.wonkity.com/~wblock/docs/html/ssd.html

And here is the PR with a patch:
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/168544
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Adam Vande More
On Sun, May 26, 2013 at 6:32 PM, Warren Block wbl...@wonkity.com wrote:

 Another problem with SSDs is that they can have difficulty with wear
 leveling.  This is even worse with swap because there is no way to use TRIM
 to tell the SSD about blocks that have been freed.

Um, that is wrong.  It is in fact the basically the point of TRIM.
And SSD's typically use the best form of wear leveling and it's
usually advisable to leave a bit of the drive unpartitioned/unused to
ensure the wear leveling works optimally.



--
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Warren Block

On Sun, 26 May 2013, Adam Vande More wrote:


On Sun, May 26, 2013 at 6:32 PM, Warren Block wbl...@wonkity.com wrote:


Another problem with SSDs is that they can have difficulty with wear
leveling.  This is even worse with swap because there is no way to use TRIM
to tell the SSD about blocks that have been freed.


Um, that is wrong.


Which part?  A FreeBSD swap partition has no way to use TRIM, so I 
suggest using a swap file on top of UFS, which does support TRIM.



It is in fact the basically the point of TRIM.
And SSD's typically use the best form of wear leveling and it's
usually advisable to leave a bit of the drive unpartitioned/unused to
ensure the wear leveling works optimally.


Using TRIM should preserve performance better than leaving unused space 
and letting the drive wear leveling algorithm move data around without 
the hint.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Case sensitive usernames and sendmail - mystic voodoo

2013-05-26 Thread Modulok
List,

Step1: Make a new user::

root@localhost# pw useradd foo -m -s /bin/tcsh -h 0
password for user foo: (secret)

Step 2: Does sendmail know them::

root@modunix# sendmail -bv foo@localhost
foo@localhost... deliverable: mailer local, user foo

# Good...

Step 3: Make a new user with uppercase 'B'::

root@localhost# pw useradd Bar -m -s /bin/tcsh -h 0
password for user Bar: (secret)

Step 4: Does sendmail know them::

root@modunix# sendmail -bv Bar@localhost
Bar@localhost... User unknown


Curious, why? I know usernames are case-sensitive, I thought emails were
too. Without fighting an epic battle with with the sendmail configs, is
there a simple way to make this work?

The obvious answer is probably, usernames should be lowercase! and for
new users I'll enforce that policy. For existing users however, who may
already have lots of case-sensitive usernames in various config files,
etc this isn't a real option. By just altering their usernames I'm
afraid I'd break the whole damn universe. How can I enable mail for
them?

Cheers!
-Modulok-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Case sensitive usernames and sendmail - mystic voodoo

2013-05-26 Thread Erich Dollansky
Hi,

On Sun, 26 May 2013 18:44:41 -0600
Modulok modu...@gmail.com wrote:

 List,
 
 Step1: Make a new user::
 
 root@localhost# pw useradd foo -m -s /bin/tcsh -h 0
 password for user foo: (secret)
 
 Step 2: Does sendmail know them::
 
 root@modunix# sendmail -bv foo@localhost
 foo@localhost... deliverable: mailer local, user foo
 
 # Good...
 
 Step 3: Make a new user with uppercase 'B'::
 
 root@localhost# pw useradd Bar -m -s /bin/tcsh -h 0
 password for user Bar: (secret)
 
 Step 4: Does sendmail know them::
 
 root@modunix# sendmail -bv Bar@localhost
 Bar@localhost... User unknown
 
 
 Curious, why? I know usernames are case-sensitive, I thought emails
 were too. Without fighting an epic battle with with the sendmail
 configs, is there a simple way to make this work?
 
 The obvious answer is probably, usernames should be lowercase! and
 for new users I'll enforce that policy. For existing users however,
 who may already have lots of case-sensitive usernames in various
 config files, etc this isn't a real option. By just altering their
 usernames I'm afraid I'd break the whole damn universe. How can I
 enable mail for them?
 
have you read this?

http://www.linuxquestions.org/questions/linux-software-2/sendmail-unable-to-find-users-22290/

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: swap partition leads to instability?

2013-05-26 Thread Adam Vande More
On Sun, May 26, 2013 at 7:20 PM, Warren Block wbl...@wonkity.com wrote:
 Which part?

This part:  Another problem with SSDs is that they can have
difficulty with wear leveling.  Do as I suggested and you'll get
maximum life from the drive even with swap present.  Even absent of
best practices, SSD's in general do a great job in managing wear
leveling.  We're 5+ years out from crappy SSD's with dynamic wear
leveling.  Modern SSD's don't suffer nearly the write amplification
effect of earlier drives.  Also the write amplification effect only
comes into play during random writes.  A lot of common swap usage
isn't random.  All this is of course assuming we're dealing with a
quality drive.  If you're using a cheap Chinese knock off, all bets
are off.

 A FreeBSD swap partition has no way to use TRIM, so I suggest
 using a swap file on top of UFS, which does support TRIM.

 Using TRIM should preserve performance better than leaving unused space and
 letting the drive wear leveling algorithm move data around without the hint.

Normal dynamic wear leveling on a modern SSD will be better than
imposing an FS- backed swap for 4GB partion occupying a small fraction
of total drive space.  File backed paging imposes two sets of
bottlenecks and TRIM only *helps* with one.  Another part of the
equation is how much is swap used.  If rarely, this is a non-issue to
begin with.  If it's significant, any flash SSD probably isn't
appropriate.  Certain other SSD's are not subject to these guidelines
at all.

--
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Case sensitive usernames and sendmail - mystic voodoo

2013-05-26 Thread Polytropon
On Sun, 26 May 2013 18:44:41 -0600, Modulok wrote:
 I know usernames are case-sensitive, I thought emails were
 too.

If I remember e-mail basics correctly: No. They're not.
For example, f...@example.com, f...@example.com and f...@example.com
and all upper/lowercase variations are the same as f...@example.com.
For sending mail within a system and across systems, names
in the passwd file have to be in conjunction with the
respective mail queues for the users. Even foo and Foo
can coexist (as soon as they have a different UID, reflecting
the fact that two distinguishable users are intended), but
regarding mail... that sounds problematic.



 Without fighting an epic battle with with the sendmail configs, is
 there a simple way to make this work?

Use lowercase usernames only. Make it a convention.
Verify it.



 The obvious answer is probably, usernames should be lowercase! and for
 new users I'll enforce that policy. For existing users however, who may
 already have lots of case-sensitive usernames in various config files,
 etc this isn't a real option.

That's true, but didn't this approach get you in trouble earlier?



 By just altering their usernames I'm
 afraid I'd break the whole damn universe.

This is quite possible. As you mentioned correctly, usernames
with uppercase letters may already appear in config files.
You _could_ check for each user below his $HOME for any
appearing in a file and replace this, but that could cause
trouble if something is stored in a Registry-like binary file.
Regarding /etc/passwd, the home directory _may_ be a different
name than the username, so those _pathnames_ in files should
not require a change. But files mentioning _usernames_ will
probably cause problems.



 How can I enable mail for
 them?

Maybe it's possible to use /etc/mail/aliases?



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Case sensitive usernames and sendmail - mystic voodoo

2013-05-26 Thread Michael Sierchio
On Sun, May 26, 2013 at 6:17 PM, Polytropon free...@edvax.de wrote:

 On Sun, 26 May 2013 18:44:41 -0600, Modulok wrote:
  I know usernames are case-sensitive, I thought emails were
  too.

 If I remember e-mail basics correctly: No. They're not.
 For example, f...@example.com, f...@example.com and f...@example.com
 and all upper/lowercase variations are the same as f...@example.com.


You remember incorrectly ;-)

The local part of an address (before the @ sign) is case-sensitive (with
the exception of postmas...@example.com)

Everything to the right of the @ is indeed case insensitive, but everything
to the left might be case sensitive, depending on local policy.  This means
you must preserve the case of everything to the left of the @ sign.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Case sensitive usernames and sendmail - mystic voodoo

2013-05-26 Thread Polytropon
On Sun, 26 May 2013 18:36:41 -0700, Michael Sierchio wrote:
 On Sun, May 26, 2013 at 6:17 PM, Polytropon free...@edvax.de wrote:
 
  On Sun, 26 May 2013 18:44:41 -0600, Modulok wrote:
   I know usernames are case-sensitive, I thought emails were
   too.
 
  If I remember e-mail basics correctly: No. They're not.
  For example, f...@example.com, f...@example.com and f...@example.com
  and all upper/lowercase variations are the same as f...@example.com.
 
 
 You remember incorrectly ;-)

I checked again - and yes, it seems that my memory about
the valid definition has changed to what is reality today,
i. e. sendmail rewriting uppercase to lowercase prior to
further processing.



 The local part of an address (before the @ sign) is case-sensitive (with
 the exception of postmas...@example.com)

So it depends on how sendmail is configured that it does
not matter today.



 Everything to the right of the @ is indeed case insensitive, but everything
 to the left might be case sensitive, depending on local policy.  This means
 you must preserve the case of everything to the left of the @ sign.

According to the link provided by Erich Dollansky, FreeBSD's
default sendmail.cf setting of

Mlocal,   P=/usr/libexec/mail.local, F=lsDFMAw5

needs to be added the u option to the F= parameter to preserve
the uppercase letters in the the left side (username) of the
address. Maybe this additiion is required in other cf files
containing Mlocal settings too? Of course it would be nice if
there was a corresponding setting for the mc files which the
cf files are usually generated from...



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Case sensitive usernames and sendmail - mystic voodoo

2013-05-26 Thread Modulok
 Everything to the right of the @ is indeed case insensitive, but
 everything
 to the left might be case sensitive, depending on local policy.  This
 means
 you must preserve the case of everything to the left of the @ sign.

 According to the link provided by Erich Dollansky, FreeBSD's
 default sendmail.cf setting of

   Mlocal,   P=/usr/libexec/mail.local, F=lsDFMAw5

 needs to be added the u option to the F= parameter to preserve
 the uppercase letters in the the left side (username) of the
 address. Maybe this additiion is required in other cf files
 containing Mlocal settings too? Of course it would be nice if
 there was a corresponding setting for the mc files which the
 cf files are usually generated from...

So, best practices aside, this would be a bug in the default config?
(i.e. can I celebrate my bug-finding yet?)

Cheers!
-Modulok-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Case sensitive usernames and sendmail - mystic voodoo

2013-05-26 Thread Polytropon
On Sun, 26 May 2013 21:31:09 -0600, Modulok wrote:
  Everything to the right of the @ is indeed case insensitive, but
  everything
  to the left might be case sensitive, depending on local policy.  This
  means
  you must preserve the case of everything to the left of the @ sign.
 
  According to the link provided by Erich Dollansky, FreeBSD's
  default sendmail.cf setting of
 
  Mlocal,   P=/usr/libexec/mail.local, F=lsDFMAw5
 
  needs to be added the u option to the F= parameter to preserve
  the uppercase letters in the the left side (username) of the
  address. Maybe this additiion is required in other cf files
  containing Mlocal settings too? Of course it would be nice if
  there was a corresponding setting for the mc files which the
  cf files are usually generated from...
 
 So, best practices aside, this would be a bug in the default config?

No. A convention. :-)



 (i.e. can I celebrate my bug-finding yet?)

Depends. If it's a _desired_ convention (because people regularly
have problems with e-mail addresses and just don't care for upper
and lower case), it's a good default setting. In _your_ case, it
does not apply, because it introduces problems. So if you intend
to make a local modification, that's no problem because you _can_
configure such things. This is the power that comes by the freedom
of choice. You can celebrate this. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org