RELEASE-8.1 with heavy network activity (nginx + php-fpm)

2011-07-08 Thread Adam PAPAI

I have a FreeBSD box with 8.1.

It seems we hit the limits for the maximum network connections, because 
I always see this message in the nginx-error.log:


2011/07/08 08:48:40 [error] 40438#0: *30564045 kevent() reported that 
connect() failed (54: Connection reset by peer) while connecting to 
upstream, client: 188.36.171.27, server: netadclick.com, request: GET 
/hirdetes/148 HTTP/1.1, upstream: fastcgi://127.0.0.1:9000, host: 
www.netadclick.com, referrer: http://www.netadclick.com/hirdetes/148;
2011/07/08 08:48:41 [error] 40438#0: *30564021 writev() failed (54: 
Connection reset by peer) while sending request to upstream, client: 
95.171.73.72, server: netadclick.com, request: GET /hirdetes/1051/0505 
HTTP/1.1, upstream: fastcgi://127.0.0.1:9000, host: 
www.netadclick.com, referrer: 
http://www.freespirit.hu/szex/durva_ezert_ne_hordj_tangat;


The Box has approximately: 35,000 - 65,000 connections at the same time:

In the early morning it has 45,564 connections:

netstat -n | grep '^tcp4' | wc -l
45564


The system runs correctly for a few minutes, and after it's reaching 
some limits, all connections are reset (Connection reset by peer, the 
error log is filled with thousands of Connection reset by peer message) 
and it starts working correctly again for another few minutes.


I've tuned some variables like:

kern.ipc.shmall=32768
kern.ipc.shmmax=134217728
kern.ipc.semmap=256
net.inet.ip.maxfragpackets=1600
kern.threads.max_threads_per_proc=4096
kern.maxfiles=204800
kern.maxfilesperproc=20
kern.maxvnodes=20
net.inet.tcp.maxtcptw=20
kern.ipc.nmbjumbo9=24000
kern.ipc.nmbjumbo16=10240
kern.ipc.maxsockets=65536
net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.recvbuf_auto=0
net.inet.tcp.recvspace=65535
net.inet.ip.portrange.randomized=0
net.inet.ip.intr_queue_maxlen=4096
net.inet.tcp.finwait2_timeout=3
kern.ipc.somaxconn=2048

/boot/loader.conf
kern.ipc.semmni=1024
kern.ipc.semmns=2048
kern.ipc.semmnu=1024
kern.ipc.maxsockets=65536
kern.maxproc=12328
kern.ipc.shmmax=2147483648
kern.ipc.somaxconn=4096
net.inet.tcp.hostcache.cachelimit=65532


What should I do? Any ideas? Any tuning tips?

Thanks in advance,

--
Adam PAPAI

___
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: sysbench / fileio - Linux vs. FreeBSD

2010-06-06 Thread Adam PAPAI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/5/10 2:43 AM, Igor Mozolevsky wrote:
 On 5 June 2010 00:58, Adam PAPAI w...@wooh.hu wrote:
 
 How can I tune my disk to make it faster? Is it possible? What is the
 reason of the really slow I/O with more than 4 threads? What do you
 recommend me to do? Why is it damn slow with 8K blocksize?
 
 Does linux still have async disk writes by default?

Anyway, I looked after the default ext3 values:

Debian mounts the ext3 with defaults option.

This means: rw, suid, dev, exec, auto, nouser, and async.

Well it means I have to test it with UFS (async) and Debian (sync).

These test will take some time but I hope it worth the effort.

Hm...


- -- 
Adam PAPAI
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMC31LAAoJEGq0EWvh5uiIu3MH/i7KWfcYj2zXSsqbUK2W4dKi
B0+pD861FBtxmS+O4c4jzR5vJYeVVyVfZ4DLpHs0tqr6u2QZWgTD5c9GXxRNn9Hg
pVIL8/iL9BGtjNZdbjKU2RlE+QOb4LUuxqTWtz3poH4e6CQlAMOzvBcmbK41eWVn
nr2/jlS8n7TFk74ewAH9NXABrhIaOtCjBf5YWWA9AnKhqjdlAM7gxC6QcbsGTLlR
5zvq6UfGuAMECOV98FDlm3k20LydLT0/Mdw9jth9+50v1NMnAddYjfZ/7Ci2KzZo
uUN1VRcOhxmw6oliMPu/+Z324d6Xrp1vXpDQN8tSzME1d3O3CswPDfs3ocpjmkU=
=VEsH
-END PGP SIGNATURE-
___
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: sysbench / fileio - Linux vs. FreeBSD

2010-06-05 Thread Adam PAPAI
On 6/5/10 3:36 AM, Bruce Cran wrote:
 Some quick tests show that ufs does do rather poorly on my system too. I have 
 the following filesystems setup:
 
 /var : ufs with softupdates
 /usr/obj : zfs with checksums disabled
 /usr/src : zfs with compression enabled
 /home   : zfs with compression disabled and checksums enabled
 
 I ran a test with a blocksize of 8KB and 16 threads.
 
 /var   : 25.2MB/s
 /usr/obj : 64.8MB/s
 /usr/src : 386.3MB/s
 /home   : 60.3MB/s
 

It seems I have to test it with zfs as well. Tomorrow I'm gonna test it.


-- 
Adam PAPAI
___
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: sysbench / fileio - Linux vs. FreeBSD

2010-06-05 Thread Adam PAPAI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/5/10 1:04 PM, Bruce Cran wrote:
 On Sat, 5 Jun 2010 12:50:15 +0200
 Stefan Miklosovic miklosovic.free...@gmail.com wrote:
 
 /var : ufs with softupdates
 /usr/obj : zfs with checksums disabled
 /usr/src : zfs with compression enabled
 /home   : zfs with compression disabled and checksums enabled

 I ran a test with a blocksize of 8KB and 16 threads.

 /var   : 25.2MB/s
 /usr/obj : 64.8MB/s
 /usr/src : 386.3MB/s
 /home   : 60.3MB/s

 Do I understand it well? It seems that zfs with compression enabled on
 /usr/src with 8KB block size and 16 threads performs 386.3MB/s which
 is about 6 times better than debian5? I am thinking about this image
 http://tech-blog.wooh.hu/~wooh/debian_vs_freebsd_io_16_seqwr.png
 
 Yes - on one run it even hit 500MB/s. I suspect, however, that the
 benchmark isn't accurate because it won't be writing typical data.
 Instead it's probably using a buffer that compresses very well.

Hm.. My ZFS tests showed me the same results. With compression it's
pretty fast. An application benchmark will give us typical data write,
so I'll run PgSQL benchmarks on the ZFS pool as well.


- -- 
Adam PAPAI
NETIDEA Informatikai Szolgáltató Kft.
http://www.netidea.hu
E-mail: w...@wooh.hu
Phone: +36 30 33-55-735 (Hungary)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMCjJiAAoJEGq0EWvh5uiIKFMH/1dP4OZGAMiBNSoRqGFfnZ5B
/vtf5do2t3JRbjfYi2HyNn8gXss4xRDPouVmftl2OglIXA77hMIyIcjyoWnHGTBc
M1WnnNDz1wIb8EYSl9MYKAjQA1wGsYd4UImd1MqOtZfSuOht6hTLoSiAnC1xMLtk
9vgFUtMok8XclPqL08J/dWs39+HwhSaooRnLEx7IYLSgFis7vQtJjOaWWG3LUADw
QsivcCSjBBoQ7LD9WXN5prmlwt+CMBU/F1yyMaJXa0bNI7AM+hh5Mix03P4HAKEz
4Z92lcmLXzSVnllA0tAJvAwEPtk4laP6yzM9egStDNvxONLueQVLXfY8gvukQ2k=
=MVI2
-END PGP SIGNATURE-
___
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


sysbench / fileio - Linux vs. FreeBSD

2010-06-04 Thread Adam PAPAI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi List,

A week ago I started to benchmark Linux vs. FreeBSD on a Dell Poweredge
1850.

CPU: 2 x 3.4Ghz Xeon (Dual Core)
Memory: 8GB (4x2)
Disk: 1 x SEAGATE ST373454LC D404 (SCSI)

FreeBSD kazoku 8.0-RELEASE-p3 FreeBSD 8.0-RELEASE-p3 #0: Tue May 25
20:54:11 UTC 2010
r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

The tests with seqrewr, seqrd, rndrd, and so on is still going on, so I
can only publish the seqwr result. (The PostgreSQL will be tested as well)

(soft-updates are on)
/dev/da0s1d on /usr (ufs, local, soft-updates)

Tested with:
sysbench --num-threads=$a --file-block-size=$bs --test=fileio
- --file-total-size=2G --file-fsync-all=no --file-test-mode=seqwr run

My first results (seqwr with 1,2,4,8,6,32 threads) can be found here.

http://tech-blog.wooh.hu/~wooh/fbsd_vs_debian_seqwr.html

Why FreeBSD is supreme with 1 and 2 thread. And why is it 2 and 3 times
slower with 4-8-16-32 threads compared to Debian? The first two tests (1
thread and 2 thread) showed me that FreeBSD is supreme in I/O, but later
tests showed me, that it can produce horrible I/O.

How can I tune my disk to make it faster? Is it possible? What is the
reason of the really slow I/O with more than 4 threads? What do you
recommend me to do? Why is it damn slow with 8K blocksize?

I have more than 15 FreeBSD servers in production environment and I
don't want to change operating system due to I/O issues. I changed my
OpenBSD servers to FreeBSD 3 years ago... :)

When all tests are ready I'll publish all the results, including the
postgresql benchmarks as well.

Best Regards,

- -- 
Adam PAPAI
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMCZMrAAoJEGq0EWvh5uiI10MIAM1iZxFZ5xssKmawHl56Ruin
zHHgb4Nc15waTLdzFGfllAayDlZqvvpoSpOVbp8qDZYlkTbYPF6aMjkehqMvQUEo
nFs7WN2VaCSOhUUQSwjqfGdnMLW9H5uyW/ZkYvgoOjQjz/vewDV6Fi+ZfGmt5Zqw
gV1ZlXFdAUOUW6c90ODOPxn+7XCA5UC2sUMPB+1iNxrTiiS6C2YQ0Vy1fCXvrhU3
51n0ES/7JBF4sk5dH1VNEU/8AeQRBOoKPuAHhZKRZZ1x+1dMkDhwdD+KUHGrRGJd
fUAZmMhjE6fRG86FbwK5jrZizHZYpE3PfpZe6tI3SIvw7NbUNrRsCMSiel+0FBg=
=k3Sw
-END PGP SIGNATURE-
___
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


benchmark graphs, which software to use?

2010-05-29 Thread Adam PAPAI
Dear Mailing List,

I don't know how to create images like these:

http://people.freebsd.org/~kris/scaling/p3.png
http://people.freebsd.org/~kris/scaling/os-mysql.png

Which software should I use?

Thanks in advance,

-- 
Adam PAPAI
___
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: Magento

2010-04-16 Thread Adam PAPAI
On 4/16/10 9:24 PM, Jim Bernstorf wrote:
 I want to download and develop a Megento website.  The published OS
 requirement is:
 
  Supported Operating Systems: 
 
 * Linux x86, x86-64
 
 Will FreeBSD 8 work for this application?

It will work.

I have 2 magento sites on 7.0 and 8.0. It runs perfectly. :)

-- 
Adam PAPAI
___
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: freebsd-update(8) under sparc64? Why is it not available?

2010-03-25 Thread Adam PAPAI
On 3/24/10 11:38 PM, Marius Strobl wrote:
 On Wed, Mar 24, 2010 at 02:57:09AM -0500, Mark Linimon wrote:
 You're the first one to ask in a while.  Since our userbase is small,
 and developer time is limited, we've never set it up.

 
 The last time this topic came up IMO there was quite some
 interest in getting this running but the showstopper was that
 cperciva@ said that a requirement for any platform supported
 by freebsd-update(8) would be that the build server is able
 to run buildworld in 1 hour at most (unfortunately I currently
 just can't find that email). My 4x1.5GHz V440 I originally
 intended for this purpose unfortunately still takes 72 minutes
 last time I checked. I suspect a 8x1.2GHz V880 would be able
 to meet this requirement but I simply can't afford the housing
 for such a beast.
 Ken, did the V880s at your university become available as
 intended some time ago?

Yeah on a v100 the make buildworld takes more than 486m7.660s ~ 8 hours.

-- 
Adam PAPAI
___
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: freebsd-update(8) under sparc64? Why is it not available?

2010-03-25 Thread Adam PAPAI
On 3/24/10 11:38 PM, Marius Strobl wrote:
 The last time this topic came up IMO there was quite some
 interest in getting this running but the showstopper was that
 cperciva@ said that a requirement for any platform supported
 by freebsd-update(8) would be that the build server is able
 to run buildworld in 1 hour.

And what about ccache? I'll try it.

-- 
Adam PAPAI
___
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-update(8) under sparc64? Why is it not available?

2010-03-24 Thread Adam PAPAI

I feel that the FreeBSD project doesn't have enough sparc64 build machine.

Is this the reason why binary freebsd-update is not available for 
sparc64 arch?


The only methods for upgrading sparc64 are reinstall or build from source?


--
Adam PAPAI


___
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: freebsd-update(8) under sparc64? Why is it not available?

2010-03-24 Thread Adam PAPAI

Mark Linimon wrote:

You're the first one to ask in a while.  Since our userbase is small,
and developer time is limited, we've never set it up.

Right now I'd just be happy if I can get all the major ports to work :-)

mcl


If I can do something for this project, please tell me what to do :)

I have 2xNetra T1, 1xNetra X1, 1xFire V100, so I have some sparc64 
machines to test/build if this could help.


--
Adam PAPAI

___
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: Upgrading from 6.1 to 7.3

2010-03-24 Thread Adam PAPAI
On 3/24/10 10:53 AM, Sigmar Muuga wrote:
 Hello,
 have anybody done something like this? Is it reasonable or is it better
 to make a clean install?

You should read this:

http://people.freebsd.org/~rse/upgrade/freebsd-upgrade-6x-7x.txt

-- 
Adam PAPAI
___
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: Pure-ftpd non anonymous

2010-03-24 Thread Adam PAPAI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 3/24/10 8:07 PM, m.anis wrote:
 # Disallow anonymous connections. Only allow authenticated users.

Did you restart pure-ftpd after the changes?

/usr/local/etc/rc.d/pure-ftpd stop
/usr/local/etc/rc.d/pure-ftpd start


- -- 
Adam PAPAI

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJLqmlmAAoJEGq0EWvh5uiIh04H/i3SHxeW3X9mgHpoLJThDrDm
nQMmrME2lWo6IFvlG4A0vzuM/KQ4qLcAW5i6FWwjRETre9n44vMosB2uKK2botE5
hF0F7WLPJsJqZYzXptlGLTgIu5wNl9Ois/KlggxoIgwJ+5UgvlkS8IZO7J8A9dax
Lgb/BrPDyM069M3KbWgvnh43duKCTY6gAFQ134D8wRKahrG9VP4bQU05C8DpYRUn
aT6bWmpRDx+sMlm7s9F8Aq4guX+8RnutK2faQFxpR0OYfNKL/fvDJuy1NndhmYo4
N+y7gERG32MXfb1Nqw3lbcFUlJWW8kpOWnqVoqGcAHmOXi0XTT+VbWixoa7XCA4=
=QoKC
-END PGP SIGNATURE-
___
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: Setting ucastrate in /etc/rc.conf

2010-03-23 Thread Adam PAPAI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 3/22/10 8:32 PM, Christopher Theodore; RHODES wrote:
 Hello;
 
 
 $ uname -rs
 FreeBSD 8.0-RELEASE-p2
 
 
 I have setup ral0/wlan0 in /etc/rc.conf thusly:
 
wlans_ral0=wlan0
create_args_wlan0=wlanmode sta mcastrate 54 ssid linksys channel 6
ifconfig_wlan0=inet 10.0.0.10 netmask 255.255.255.0
 
 
 This provides a working interface but ucastrate is not being set and I
 have to manually set it after I login with:
 
 # ifconfig wlan0 ucastrate 54
 
 
 How can I effectively set ucastrate in rc.conf?

is this a typo?

mcastrate != ucastrate

Have you tried this one

create_args_wlan0=wlanmode sta ucastrate 54 ssid linksys channel 6

instead this?

create_args_wlan0=wlanmode sta mcastrate 54 ssid linksys channel 6

- -- 
Adam PAPAI

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJLqMjJAAoJEGq0EWvh5uiI89AIAL/zRdFyBi0ZsF/jZTwN3ndL
rMlli/x4W+i9q1F3vjc5jVhMC80xexw2qsionnqqRRooq8ptE40+1WD0o2XKi26v
vbcrGJw5Mns/IefwjKUBwVNjnkmbODuUDhRYfSR38e4M3BkikUPgGQoCSUTrOYRt
OAAj4n0aaFwzMnh6IuVlmqtrwUR4R8Xbr9rZjFNYNSvajHBnwerOOfSssoZXVsDd
3E874lHIwiNXKbEo00tWzn94dnQQJ6XP5+8vdGj0nHmkP+ZVddY0l3v3jsT/z0uc
wwqCkwyy84qLa+i9evUzMtvv/GetK4XFRi9YgxVqknuyFZwG/Ck25vlck79NUgU=
=5Fkt
-END PGP SIGNATURE-
___
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: GBDE encryped File system

2010-03-20 Thread Adam PAPAI

On 3/20/10 6:29 AM, Aiza wrote:

In release 8.0 is GBDE now part of the base system?
If not what is the /boot/loader.conf command to add to enable it?


You don't have to enable it. Nothing to add to the loader.conf.

But if you want to mount the partitions during the boot:

18.16.1.2.1 Automatically Mounting Encrypted Partitions

It is possible to create a script to automatically attach, check, and 
mount an encrypted partition, but for security reasons the script should 
not contain the gbde(8) password. Instead, it is recommended that such 
scripts be run manually while providing the password via the console or 
ssh(1).


Please read:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-encrypting.html

--
Adam PAPAI
___
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


How to send a patch in a proper way?

2010-03-19 Thread Adam PAPAI

Hi,

As of today I'll try to help and create bugfix patches for usr/src and 
usr/ports.


I've already done 2 patches and posted it to the -current list but don't 
really know what is the best way to post the patches. Who will check 
them? who will make the decision to use them? How should I send the 
patches? diff -u full path or relative path?


Is there any FAQ about this issue?

Thanks in advance,

--
Adam PAPAI

___
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