FreeBSD

Effects of Changing vfs.ufs.dirhash_maxmem in FreeBSD

I have a busy web frontend server many files in a single directory. The server is running FreeBSD 8 amd64. Here is the result of changing the sysctl vfs.ufs.dirhash_maxmem to 67108864. Note the change in system (red) area. The vertical arrow shows when the change was made:

Recovering from a terminal full of gibberish

Have you ever accidentally tried to view a binary file and your terminal started spewing all sorts of weird characters?

$ cat /etc/localtime
???w?qˈ???#?p?a???u??@???U?? ???5?????????????
???s??ޗ?ݩ?p޾y?߉rp??[??iTp?~=??I6p?^?
      pa
?p@?0?p?'? ?p ??
?p
  ???
?u???????t??tyV?iVY8?I89?)"7?p???p?????p?܀??p v!??p"U?#j??$5?%J??&?'*??'?р)
p???q5?ro??s?tO??t??v8?pv?πx?px???y?hpz???{?Jp|~u?}?,p~^W??GәI
                                                                           ????????LMTCDTCSTESTCWTCPT
CST6CDT,M3.2.0,M11.1.0
▒⎼±␋⎺⎻␊#

The solution is to type reset and hit return.

▒⎼±␋⎺⎻␊# ⎼␊⎽␊├
Erase set to backspace.
$

There. All better.

Topic: 

Performance presentation, Des Moines Web Geeks

Matt Nuzum, the webmaster of ubuntu.com, invited me to speak at the Des Moines Web Geeks meeting last night. The venue, Impromptu Studios, was a bit hard to find. There were no signs for Impromptu Studios, but after lurking in dark alleyways for a while I eventually discovered what should have been obvious from the beginning: enter the furniture store with the "Closed" sign on the front and go up the stairs past the disused lavatory with a sign on the door saying "Beware of the Leopard."

The group was great and we talked for about an hour and half about bottlenecks and optimization. I even went home with a Django book!

Since this was a diverse group I tried to talk about things that everyone has to deal with (bottlenecks for storage, network, memory and CPU) rather than anything Drupal-specific.

As promised, last night's slides: Performance, Scalability on the Server Side (PDF, 1MB).

Watching traffic on FreeBSD

Ben Wong at MostlyGeek pointed out that a great way to watch traffic on FreeBSD is the command systat -ifstat 1 which shows:

                    /0   /1   /2   /3   /4   /5   /6   /7   /8   /9   /10
     Load Average   ||   

      Interface           Traffic               Peak                Total


            lo0  in      0.000 KB/s          0.000 KB/s            4.122 MB
                 out     0.000 KB/s          0.000 KB/s            4.122 MB

           bge0  in      6.181 KB/s         36.944 KB/s            1.666 GB
                 out   110.521 KB/s        670.040 KB/s            3.444 GB
Topic: 

Pages

Subscribe to RSS - FreeBSD