gjournal for hosting server

2013-03-07 Thread Artem Kuchin

Hello!

I am setting up a new hosting server which will host about 100 sites and 
mysql databases for them.


I've read about gjournal and as i see the following benefits:

1) NO fsck after crash
2) 2x speed for small files writes
3) Some extra speed for small files reads (why???)

The web servers are mostly serving tons of small files and do tons of 
small writes.

I thinks the all in all with gjournal the fs speed should be higher.

Any thoughts?

Artem
___
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: Software raid VS hardware raid

2013-01-30 Thread Artem Kuchin


30.01.2013 1:01, Warren Block:

On Tue, 29 Jan 2013, Artem Kuchin wrote:



29.01.2013 18:57, Warren Block:

On Tue, 29 Jan 2013, Artem Kuchin wrote:

The Handbook chapter on gmirror talks about the problems with GPT 
and GEOM metadata.  In short: right now, they conflict. It's 
possible to mirror GPT partitions, but be aware that if you mirror 
more than one partition on a drive, a rebuild after replacing a 
drive could thrash the heads as mirrors are rebuilt simultaneously.


http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html 





So,
gmirror+GPT=conflict on last sector
GPT+gmirror = hardrive head kill

nice...

So, for no more than 2TB disks the best way to go is GMIRROR of the 
drive +PARTITION on top of it?


GPT partitions should work, just limit it to one mirrored partition 
per drive.


Please, clarify what you mean here.



Or maybe there is a way to instruct gmirror do rebuild only what i 
say (manual rebuild) ?


'gmirror configure -n' ?  Have not tried it.  The trick would be to do 
that before multiple mirrors start rebuilding, which they will as soon 
as geom_mirror.ko is loaded.




As i understand from the man page -n  setup the device not to auto 
rebuild  ever. So, this is probably the thing i want.  I need to setup a 
test system and play with it

a bit.


Artem
___
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: Software raid VS hardware raid

2013-01-30 Thread Artem Kuchin


30.01.2013 18:06, Warren Block:

On Wed, 30 Jan 2013, Artem Kuchin wrote:



30.01.2013 1:01, Warren Block:

On Tue, 29 Jan 2013, Artem Kuchin wrote:



29.01.2013 18:57, Warren Block:

On Tue, 29 Jan 2013, Artem Kuchin wrote:

The Handbook chapter on gmirror talks about the problems with GPT 
and GEOM metadata.  In short: right now, they conflict. It's 
possible to mirror GPT partitions, but be aware that if you mirror 
more than one partition on a drive, a rebuild after replacing a 
drive could thrash the heads as mirrors are rebuilt simultaneously.


http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html 



So,
gmirror+GPT=conflict on last sector
GPT+gmirror = hardrive head kill

nice...

So, for no more than 2TB disks the best way to go is GMIRROR of the 
drive +PARTITION on top of it?


GPT partitions should work, just limit it to one mirrored partition 
per drive.


Please, clarify what you mean here.


If only one GPT partition on a drive is mirrored with another GPT 
partition on another drive, head contention never comes up.  There is 
only one mirror.


It does nearly eliminate the usefulness of GPT partitioning.

Um... and how can i do that if i have a simple mirror with two drives 
and want to mirror everything on them? As i understand i will have at least
bootable, swap and ufs parttions on those drives, that is 3 partitions 
at least.


Artem
___
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: Software raid VS hardware raid

2013-01-30 Thread Artem Kuchin

There seems to be one more advantage to gmirror
If i understood correctly

gmirror label -v -b split -s 2048 data da0 da1 da2

will create a tripple mirror raid 1, that is
triple redundancy, which is hardly available on any hardware raid.

Am i correct here?

Also, does anyone know how to choose split threshold (-s 2048) correctly ?

Artem




___
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: Software raid VS hardware raid

2013-01-30 Thread Artem Kuchin


30.01.2013 19:28, Paul Kraus:

On Jan 30, 2013, at 10:22 AM, Warren Block wrote:


If you want to use the same drive for booting, it's possible.  Create all three 
partitions on both drives manually.  Then mirror the freebsd-ufs partition 
only.  The contents of the freebsd-boot partition don't change often, and swap 
does not have to be mirrored.

Note that if you do NOT mirror SWAP, then in the event of a disk 
failure you will most likely crash when the system tries to swap in some data 
from the failed drive. If you mirror swap then you do not risk a crash due to 
missing swap data.



yes, that's what i wanted to say.
Also, not being able to boot if first disk has some error in boot 
section or just strangly dead is not an option too. However, i was just 
thinking,
if i use gmirror then bios does not know anything about it. I may set 
both harddisk as boot disk, but if first disk is brain damaged then bios 
may just stuck
trying to boot from it and will not pass boot attempt to the second 
disk. I don't know, it depends on bios of course. But this seems to be a 
disadvantage to

a software raid.

Artem



___
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: Software raid VS hardware raid

2013-01-29 Thread Artem Kuchin


29.01.2013 11:54, Michael Powell:

Artem Kuchin wrote:


I guess what I'm trying to point out is that low performance wrt software
RAID will stem from other things besides just simply consuming a few CPU
cycles. Today's CPUs have the cycles to spare.  I've been using gmirror for
RAID 1 mirrors for a few years now and am happy with this. I have had a few
old drives die and the servers stayed up and online. This allowed me to
defer the actual drive replacement and not have to drop everything and fight
fire.



Thank you everyone for replying.

I realize that many other things affect the performance, not only the 
CPU power. For example,
disk IO kernel multithreading is one of the things. But i guess in FBSD 
9 it is more or less solved.
The server is going to be a web server with many sites and with mysql 
running on it. Nothing really really
heavy. Currently with run all this on our own server with 8 cores and 
16GB ram and 3ware raid1
and cpu load is about 5% :) Everything is quick and responsive. I hope 
to see the same on a software raid.


I really don't want to deploy ZFS on a new server where all these site 
need to migrate because i am kind of
don't fix it if it is not broken kind of guy. 
UFS+journaling+softupdates served us well for years and snapshots

are available on ufs too.

My other concern is what happens when one drive goes down if we use 
gmirror? Is it completelly transparent
and bad drive can be hot swapped while server is running and rebuild 
started?

I am thinking now about gpt+gmirror (including boot and swap)

Artem

___
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: Software raid VS hardware raid

2013-01-29 Thread Artem Kuchin


29.01.2013 18:57, Warren Block:

On Tue, 29 Jan 2013, Artem Kuchin wrote:

The Handbook chapter on gmirror talks about the problems with GPT and 
GEOM metadata.  In short: right now, they conflict.  It's possible to 
mirror GPT partitions, but be aware that if you mirror more than one 
partition on a drive, a rebuild after replacing a drive could thrash 
the heads as mirrors are rebuilt simultaneously.


http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html 






So,
gmirror+GPT=conflict on last sector
GPT+gmirror = hardrive head kill

nice...

So, for no more than 2TB disks the best way to go is GMIRROR of the 
drive +PARTITION on top of it?
Or maybe there is a way to instruct gmirror do rebuild only what i say 
(manual rebuild) ?


Artem




___
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


Software raid VS hardware raid

2013-01-28 Thread Artem Kuchin

Hello!

I have to made a decision on choosing a dedicated server.
The problem i see is that while i can find very affordable and good 
options they do not
provide hardware raid or even if they do it is not the best hardware for 
freebsd.

The server base conf is 8core 32gb ram 2.8+ ghz.
So, maybe someone has personal experience with both worlds and can tell 
if it
really matters in such configuration if i go for software raid. What are 
the benefits
and what are the negatives of software raid? How much is the performance 
penalty?
I am planning to use mirror configuration of two SATA 7200rpm 2TB disks. 
Nothing fancy.

File system planned is UFS with journaling.

Artem

___
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: Old file reappeared by itself

2012-11-14 Thread Artem Kuchin


13.11.2012 17:24, Friedrich Locke:

Be very careful, watch your back.
Someone may be trying to get you paranoid! And you are following their 
game.

Does anyone else have access to your host ?


I doubt it. The only access to the host is via ssh. The last log is not 
damaged or altered, the all.log is no altered too.

The only person who accessed the server is me.
Also, the file is restored in some previous condition, but i do not make 
backups of it and copies are not stored anywhere.
I doubt that someone made copies from 2011 and 2012 to the overwrite it. 
That seems highly unlikely.



Have you ever call the police ?


Ever - yes, in this case - no.


Do you monitor access to your box?


Yes. Nothing suspicious found.
I really suspect that this is a filesystem glitch.





On Tue, Nov 13, 2012 at 10:51 AM, Artem Kuchin mat...@itlegion.ru 
mailto:mat...@itlegion.ru wrote:



12.11.2012 14:07, Artem Kuchin:

The machines runs 4 jails. Everything is in the jails except
NAMED.
Named is run on the root host (if i may say so) itself.
There is a zone file there which i changed last week.
Today in the morning i try to open a site and host name is not
found. It worked on friday.
I went to see the the zone file. IT WAS DATED 2010  I open
it and the serial number is
something like 201103021. I do all my serials using dates, so,
while the file date is 2010
the content is from 2011 and it sure does looks so.
Then i go to secondary zone (slave) on another server and
there i find the zone from last week.
I checked all logs  and did not find anything special. The
zone file from 2010 just reappeared
from nowhere kill all the new changes.
As i said, i saw things like this in the past. It happened
insides jails and was related to files
for web sites and i thought that i and someone else messed up.
No i think i saw the same thing.


It happened today again! I checked file today and the file was
dated 5 oct 2012 but content was
from a week ago except the serial. I changed it yesterday. No
automatic  backup or restore is running.
Uptime is 321 day.  last says not one has logged in since yerterday.
I am going crazy.


___
freebsd-questions@freebsd.org
mailto: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
mailto:freebsd-questions-unsubscr...@freebsd.org




--
? ?,
? ?
 ?? ?? ??
www.itlegion.ru
www.hostilla.ru
+7 (495) 232-0338

___
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: Old file reappeared by itself

2012-11-13 Thread Artem Kuchin


12.11.2012 14:07, Artem Kuchin:

The machines runs 4 jails. Everything is in the jails except NAMED.
Named is run on the root host (if i may say so) itself.
There is a zone file there which i changed last week.
Today in the morning i try to open a site and host name is not found. 
It worked on friday.
I went to see the the zone file. IT WAS DATED 2010  I open it and 
the serial number is
something like 201103021. I do all my serials using dates, so, while 
the file date is 2010

the content is from 2011 and it sure does looks so.
Then i go to secondary zone (slave) on another server and there i find 
the zone from last week.
I checked all logs  and did not find anything special. The zone file 
from 2010 just reappeared

from nowhere kill all the new changes.
As i said, i saw things like this in the past. It happened insides 
jails and was related to files
for web sites and i thought that i and someone else messed up. No i 
think i saw the same thing.


It happened today again! I checked file today and the file was dated 5 
oct 2012 but content was
from a week ago except the serial. I changed it yesterday. No automatic  
backup or restore is running.

Uptime is 321 day.  last says not one has logged in since yerterday.
I am going crazy.

___
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


Old file reappeared by itself

2012-11-12 Thread Artem Kuchin

Hello!

I think i saw things like this on this box in the past and i always 
thought that i screwed up myself.

Buy today i am sure it happened by itself and i have proof.

First, config:

# uname -a
FreeBSD XXX 8.2-STABLE FreeBSD 8.2-STABLE #7: Tue Dec 27 20:43:27 GMT-4 
2011 X@X:/usr/obj/usr/src/sys/OMNI4  amd64


# df
Filesystem1K-blocks  Used Avail Capacity  Mounted on
/dev/da0s1a 2026030552382   131156630%/
devfs 1 1 0   100%/dev
/dev/da0s1g   699765734 511489090 13229538679%/hosts
/dev/da0s1d16244334  5562  14939226 0%/tmp
/dev/da0s1f20308398   8684136   59246%/usr
/dev/da0s1e10154158 27062   9314764 0%/var
devfs 1 1 0   100%/var/named/dev
/hosts/hoster 699765734 511489090 13229538679% /hosts/X1/hoster
/hosts/hoster 699765734 511489090 13229538679% /hosts/X2/hoster
/hosts/hoster 699765734 511489090 13229538679% /hosts/X3/hoster
/hosts/hoster 699765734 511489090 13229538679% /hosts/X4/hoster
/usr/ports 20308398   8684136   59246% /hosts/X1/usr/ports
/usr/ports 20308398   8684136   59246% /hosts/X2/usr/ports
/usr/ports 20308398   8684136   59246% /hosts/X3/usr/ports
/usr/ports 20308398   8684136   59246% /hosts/X4/usr/ports

# tunefs -p /dev/da0s1a
tunefs: POSIX.1e ACLs: (-a)disabled
tunefs: NFSv4 ACLs: (-N)   disabled
tunefs: MAC multilabel: (-l)   disabled
tunefs: soft updates: (-n) disabled
tunefs: gjournal: (-J) disabled
tunefs: trim: (-t) disabled
tunefs: maximum blocks per file in a cylinder group: (-e)  2048
tunefs: average file size: (-f)16384
tunefs: average number of files in a directory: (-s)   64
tunefs: minimum percentage of free space: (-m) 8%
tunefs: optimization preference: (-o)  time
tunefs: volume label: (-L)

# tunefs -p /dev/da0s1e
tunefs: POSIX.1e ACLs: (-a)disabled
tunefs: NFSv4 ACLs: (-N)   disabled
tunefs: MAC multilabel: (-l)   disabled
tunefs: soft updates: (-n) enabled
tunefs: gjournal: (-J) disabled
tunefs: trim: (-t) disabled
tunefs: maximum blocks per file in a cylinder group: (-e)  2048
tunefs: average file size: (-f)16384
tunefs: average number of files in a directory: (-s)   64
tunefs: minimum percentage of free space: (-m) 8%
tunefs: optimization preference: (-o)  time
tunefs: volume label: (-L)

Memory:16GB,
CPU: 8cores XEON
DISKS: RAID10 (4 disks)

The machines runs 4 jails. Everything is in the jails except NAMED.
Named is run on the root host (if i may say so) itself.
There is a zone file there which i changed last week.
Today in the morning i try to open a site and host name is not found. It 
worked on friday.
I went to see the the zone file. IT WAS DATED 2010  I open it and 
the serial number is
something like 201103021. I do all my serials using dates, so, while the 
file date is 2010

the content is from 2011 and it sure does looks so.
Then i go to secondary zone (slave) on another server and there i find 
the zone from last week.
I checked all logs  and did not find anything special. The zone file 
from 2010 just reappeared

from nowhere kill all the new changes.
As i said, i saw things like this in the past. It happened insides jails 
and was related to files
for web sites and i thought that i and someone else messed up. No i 
think i saw the same thing.


How, how the hell it is possible?

Artem






--
С уважением,
Артем Кучин
Компания Ай Ти Легион
www.itlegion.ru
www.hostilla.ru
+7 (495) 232-0338



___
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

Security monitoring all file changes

2011-04-21 Thread Artem Kuchin

Hello!

We are running hosting servers and i think we need to monitor and log 
all changes in filesystems (ftp log is written already, but
we give shell access and also files can be changed by scripts), so, when 
a client asks when the file/directory

was changed or deleted and by whom we can answer that question.

In what directtion should i look? Is Audit the thing for it?

The problem with the whole idea is that i don't want to hog the raid 
with huge log of what happened to the files

every nanosecond.

For example, file is opened, writen 1000 times with write() and the 
closed. I don't want to get 1000 lines

in the log. Something like:

opened for write
write repeated 1000 times (just one line with repetition counter)
closed

whould be nice, but if not possible, then just open and closed logged, 
w/o write. Better than nothing.

Or maybe it can be very optimized binary log.
I have no idea what i am writing about :)

Thanks in advance!

Best  regards,
Artem


--
С уважением,
Артем Кучин
Компания Ай Ти Легион
www.itlegion.ru
www.hostilla.ru
+7 (495) 232-0338


___
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


Kernel Trap 9 and freeze

2010-09-29 Thread Artem Kuchin

 Hello!

Just upgraded the world and kernel to the latest 8.1-stable via cvs 
yesterday.
Now, at 6 in the morning got kernel trap 9 (screenshot is attached). The 
worst

part is that it did not reboot. It just froze after stopping other cpus.
This is amd64 architecture.
Kernel config is attached too.

The question is how i can make the reboot in such case more reliable? 
Any kernel

options which would more reliable send the server into reboot?
Maybe some other comments on what happened and possible why?


Artem


cpu HAMMER
ident   FINIZDAT

makeoptions DEBUG=-g# Build kernel with gdb(1) debug symbols

options SCHED_ULE   # ULE scheduler
options PREEMPTION  # Enable kernel thread preemption
options INET# InterNETworking
options INET6   # IPv6 communications protocols
options SCTP# Stream Control Transmission Protocol
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL# Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
options NFSCLIENT   # Network Filesystem Client
options NFSSERVER   # Network Filesystem Server
options NFSLOCKD# Network Lock Manager
options NFS_ROOT# NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
options CD9660  # ISO 9660 Filesystem
options PROCFS  # Process filesystem (requires PSEUDOFS)
options PSEUDOFS# Pseudo-filesystem framework
options GEOM_PART_GPT   # GUID Partition Tables.
options GEOM_LABEL  # Provides labelization
options COMPAT_43TTY# BSD 4.3 TTY compat (sgtty)
options COMPAT_FREEBSD32# Compatible with i386 binaries
options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
options KTRACE  # ktrace(1) support
options STACK   # stack(9) support
options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options P1003_1B_SEMAPHORES # POSIX-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time 
extensions
options PRINTF_BUFR_SIZE=128# Prevent printf output being 
interspersed.
options KBD_INSTALL_CDEV# install a CDEV entry in /dev
options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
options AUDIT   # Security event auditing
options MAC # TrustedBSD MAC Framework
options FLOWTABLE   # per-cpu routing cache
#optionsKDTRACE_FRAME   # Ensure frames are compiled in
#optionsKDTRACE_HOOKS   # Kernel DTrace hooks
options INCLUDE_CONFIG_FILE # Include this file in kernel

# Make an SMP-capable kernel by default
options SMP # Symmetric MultiProcessor Kernel

# CPU frequency control
device  cpufreq

# Bus support.
device  acpi
device  pci

# Floppy drives
device  fdc

# ATA and ATAPI devices
device  ata
device  atadisk # ATA disk drives
device  ataraid # ATA RAID drives
device  atapicd # ATAPI CDROM drives
device  atapifd # ATAPI floppy drives
device  atapist # ATAPI tape drives
options ATA_STATIC_ID   # Static device numbering

# SCSI Controllers
device  ahc # AHA2940 and onboard AIC7xxx devices
options AHC_REG_PRETTY_PRINT# Print register bitfields in debug
# output.  Adds ~128k to driver.
device  ahd # AHA39320/29320 and onboard AIC79xx devices
options AHD_REG_PRETTY_PRINT# Print register bitfields in debug
# output.  Adds ~215k to driver.
device  amd # AMD 53C974 (Tekram DC-390(T))
device  hptiop  # Highpoint RocketRaid 3xxx series
device  isp # Qlogic family
#device ispfw   # Firmware for QLogic HBAs- normally a module
device  mpt # LSI-Logic MPT-Fusion
#device ncr # NCR/Symbios Logic
device  sym # NCR/Symbios Logic (newer chipsets + those of 
`ncr')
device  trm 

3ware 8006-2lp hang with ACPI enabled on fbsd-6.4

2009-03-25 Thread Artem Kuchin

Hello!

I have something strange here.
I had a pretty old (5 y.o) network server with mirror raid on 3WARE 8006-2LP
running FreeBSD 5.3. memory or mb started to fail
periodically, so the server was upgraded to Asus P5Q MB. Everything was 
fine.
Then i decided to upgrade to 6.4-STABLE. After upgrade the machines just 
locked up
after kernel boot is complete and daemons started to load. I have tried 
many times: sometimes
i see PCI parity error from twe driver. Something i don't see any 
message at all, the machines just

freezes.
I tried changing  pci  slot, playing with BIOS settings - no luck.
Then i just booted with ACPI disables and everything worked fine!
I tried disabling parts of ACPI with debug.acpi loader options, but if i 
disable
bus and pci  the loader cannot load the kernel and all other options 
do not help.

The firmware on the raid controller is the latest available (dec 2007).

Can anyone explain, why everything worked fine on 5.4 and locks up on 6.4?

I am upgrading the box to 7.1-STABLE now via cvs.

--
Regards,
Artem

___
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


Please, recommend CPU and RAM burn test

2009-02-24 Thread Artem Kuchin

Hello!

I need to really heavily test a box with 8 cores and 16GB FBDIM RAM.

Is there a suitable port for such task?

I'd like to point out that i don't want to measure perfomance. I need to 
really really

heavily load the server up to it's maximum.

--
Artem

___
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


6.8 became very slow

2009-01-29 Thread Artem Kuchin
I have  a very strange situation here. There was a hosting box with 5 
jails.

Everything is 6.4
It was running twe driver with RAID 5.

Then i had a crash and had to reinstall the system.

So, i have installed FREEBSD 6.8, cvsed the latest, rebuilt everything 
and then
just copied jails from the prev installation. So, the host system is 6.8 
and the jails are 6.4.

Also, raid is MIRROR now, not RAID5.

The problem is that now everything became really slow.

When i do top i see:
load averages: 16.45, 14.86, 13.86
737 processes: 20 running, 703 sleeping, 14 zombie
CPU: 15.9% user,  0.0% nice, 81.9% system,  2.2% interrupt,  0.0% idle

Everything pretty much as it was. But 82% system CPU is really weird. I 
don;t remember
exactly, but i think it was not like this before. AFAIK it meas 82% of 
CPU time is spent in

the kernel.

I look at the io stats: gstat:
dT: 1.005s  w: 1.000s
L(q)  ops/sr/s   kBps   ms/rw/s   kBps   ms/w   %busy Name
   0  0  0  00.0  0  00.00.0| acd0
   0  0  0  00.0  0  00.00.0| ad2
   0  0  0  00.0  0  00.00.0| ad2s1
   0  9  8 163.9  1  80.63.1| twed0
   0  0  0  00.0  0  00.00.0| twed1
   0  0  0  00.0  0  00.00.0| ad2s1c
   0  0  0  00.0  0  00.00.0| ad2s1d
   0  9  8 163.9  1  80.63.2| twed0s1
   0  0  0  00.0  0  00.00.0| twed1s1
   0  0  0  00.0  0  00.00.0| twed0s1a
   0  0  0  00.0  0  00.00.0| twed0s1b
   0  0  0  00.0  0  00.00.0| twed0s1c
   0  0  0  00.0  0  00.00.0| twed0s1d
   0  0  0  00.0  0  00.00.0| twed0s1e
   0  8  8 163.9  0  00.03.1| twed0s1f
   0  1  0  00.0  1  80.80.1| twed0s1g
   0  0  0  00.0  0  00.00.0| twed1s1a
   0  0  0  00.0  0  00.00.0| twed1s1b
   0  0  0  00.0  0  00.00.0| twed1s1c
   0  0  0  00.0  0  00.00.0| twed1s1d
   0  0  0  00.0  0  00.00.0| twed1s1e
   0  0  0  00.0  0  00.00.0| twed1s1f

This seems to be okay.

Any idea what might happened?



--
Regasrd
Artem Kuchin

___
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: 6.8 became very slow

2009-01-29 Thread Artem Kuchin


Bill Moran ?:

In response to Artem Kuchin mat...@itlegion.ru:

  
I have  a very strange situation here. There was a hosting box with 5 
jails.

Everything is 6.4
It was running twe driver with RAID 5.

Then i had a crash and had to reinstall the system.

So, i have installed FREEBSD 6.8, cvsed the latest, rebuilt everything 
and then
just copied jails from the prev installation. So, the host system is 6.8 
and the jails are 6.4.

Also, raid is MIRROR now, not RAID5.



OK.  I originally thought your subject was a typo, but this is the
second place where you mentioned 6.8.

Not only would you have to go into the future to get 6.8, but you'd
have to slip into an alternate reality, since 6.5 is expected to be
the last release on the 6 branch.

What is the output of uname -a?  If you really have something called
6.8, where on earth did you get it?

  
Apparently i just made it up. I should change the tea i drink or check 
the water source.

Of course the new is still 6.4 just updates to the latest sources.
Maybe i got confuses about the version since it is the last server 
running version 6 and

i was kind of subconsciously sure that 6.8 must be the last before 7 :)

The problem is that now everything became really slow.

When i do top i see:
load averages: 16.45, 14.86, 13.86
737 processes: 20 running, 703 sleeping, 14 zombie
CPU: 15.9% user,  0.0% nice, 81.9% system,  2.2% interrupt,  0.0% idle

Everything pretty much as it was. But 82% system CPU is really weird. I 
don;t remember
exactly, but i think it was not like this before. AFAIK it meas 82% of 
CPU time is spent in

the kernel.



gstat output seems to indicate nothing unusual, so the time spent in
the kernel must be for something else, network traffic maybe?  Try
checking top with -m io to see if anything is showing an unusually
high # of context switches.

Perhaps do a little easter egg hunting and try shutting down processes
to see what is using up all the system time.  Once you've got it
narrowed down you can run ktrace on the problematic process to see
what it's doing.

  
Well, the trick is it was not so before and i did not change anything. 
It is a web hosting server

and host around 100 sites with a lot of perl running.
22533 xxx 1 130 0 21276K 12904K CPU2 2 0:02 62.68% perl5.8.8
22545 xxx 1 116 0 3592K 2992K RUN 3 0:01 51.00% perl
22542 xxx 1 -4 0 5448K 3908K CPU0 0 0:01 43.05% perl
22546 xxx 1 -4 0 3564K 2968K RUN 0 0:01 36.00% perl
22501 xxx 1 4 0 25168K 17148K sbwait 3 0:04 20.84% perl5.8.8
21165 xxx 1 130 0 15168K 12248K RUN 0 0:59 17.29% perl
22556 xxx 1 -4 0 3596K 2900K RUN 0 0:00 15.00% perl5.8.8
18125 xxx 1 113 0 26912K 18908K select 2 0:10 14.94% httpd
22495 xxx 1 4 0 25168K 17152K sbwait 0 0:04 12.50% perl5.8.8
22496 xxx 1 4 0 15056K 13832K sbwait 3 0:04 12.01% perl5.8.8
22502 xxx 1 4 0 8640K 7436K sbwait 1 0:02 11.57% perl5.8.8

It they have been running before and it was a lot faster.

top -m io shows 0.00% for all processes.

The memory is more than enough:

Mem: 3081M Active, 3702M Inact, 339M Wired, 395M Cache, 112M Buf, 511M Free

I tried disabling mysql just for fun. I did not help.

Shutting down process by process is not an option because
1) it is a production server
2) there over 700 processes

trafshow shows average CPS about 400K/sec - not much and as it was before.

So, is there anyway to see what kernel is doing and why system load is 
so high?


--
Artem


___
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: Steps to upgrade from 7.0-RELEASE to 7.1-RELEASE

2009-01-29 Thread Artem Kuchin



Mike Clarke ?:

On Thursday 29 January 2009, Akenner wrote:

  

For some reason if you follow along line by line in the book FreeBSD
Unleashed Second edition which was written and came with 5.0 on CD,
it doesn't work at all for some reason. I think there must have been
a few changes in the way things are done between these versions but I
couldn't get those instructions to work at all. I'm sure it works
great on 5.0 but I kind of fell for 7.1 like a school kid lol.




  


I have never had a single problem updating system remotely via internet 
like this:


doing a sup file like this:

*default host=cvsup4.FReeBSD.org
*default base=/usr
*default prefix=/usr
*default release=cvs tag=RELENG_7
*default delete use-rel-suffix
*default compress

src-all
doc-all tag=.
ports-all tag=.

Then

csup supfile

Then
cd /usr/local/src
make buildworld  bw
check the end of bw
make buildkernel KERNCONF=MYKERN bk
check what's in bk

i redirect output to save the bandwidth and traffic
stop as many thing as i can stop

make installkernel KERNCONF=MYKERN
make installworld iw

check what's in iw

mergemaster -p
mergemaster

disable everything in /local/etc/rc.d and as many as possible in rc.conf

shutdown -r now

and then it's up and it's a new version!

as i said - it never failed!

--
Artem




___
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: 6.8 became very slow

2009-01-29 Thread Artem Kuchin


Mel пишет:

On Thursday 29 January 2009 02:44:56 Artem Kuchin wrote:
  

I have  a very strange situation here. There was a hosting box with 5
jails.
Everything is 6.4
It was running twe driver with RAID 5.

Then i had a crash and had to reinstall the system.

So, i have installed FREEBSD 6.8, cvsed the latest, rebuilt everything
and then
just copied jails from the prev installation. So, the host system is 6.8
and the jails are 6.4.
Also, raid is MIRROR now, not RAID5.



If you had to reinstall, you may have missed a boot loader configuration. I 
would investigate how your raid5 went to MIRROR, that would certainly account 
for the high system time if the OS and raid card think differently about the 
raid system used.
How you'd go about this, is for someone else to answer. I personally would 
compare daily runs and dmesg's saved from before reinstall with current 
installation.
  
I am sure this is not the case because the new raid was simply recreated 
manually using 3ware bios and

then freebsd installed and then old data copied from backup.


BTW, here are the interrupts:
interrupt  total   rate
irq14: ata0   47  0
irq15: ata1  4818547  3
irq28: em0 137807398105
irq72: twe0 66970618 51
cpu0: timer   2606991398   2000
cpu1: timer   2596549865   1992
cpu2: timer   2606991199   2000
cpu3: timer   2596549863   1992
Total10616678935   8145

And here is vmstat -i output from another box running 7.1

interrupt  total   rate
irq1: atkbd01478  0
irq6: fdc0 1  0
irq14: ata0   69  0
irq17: pcm0 twe037631996 27
irq21: fxp0 30360322 21
irq22: fxp186882  0
irq23: rl0  31359763 22
cpu0: timer556023401399
cpu1: timer557037363399
Total 1212501275870


So, this 6.4 gets 9 times more interrupts (mostly timer).
Is is okay?

--
Artem



___
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


Blocking very many (tens of thousands) ip addresses in ipfw

2009-01-14 Thread Artem Kuchin

I need to block around 15 ip addreses from acccess the server at all
at any port.  The addesses are random, they are not nets.
These are the spammer i want to block for 24 hours.
The list is dynamically generated and regenerated every hour or so.
What is the most efficient way to do it?
At first i thought doing ipfw rules using 5 ips per rule, that would
result in 3 rules! This will be too slow!
I need to something really quick and smart. Like matching the first
number from ip (195 from 192.1.2.3),
if it does not match - skip, if it does - compare the next one
and so on.


--
Regards
Artem Kuchin
___
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: 3ware array access lock up on 7.1-RC

2008-12-29 Thread Artem Kuchin



Mel пишет:

On Friday 26 December 2008 08:12:49 Artem Kuchin wrote:
  

I am not even sure that it is related to freebsd, but maybe someone could
point out the problem.

We wanted to upgrade our hosting server from
FreeBSD 6.2, 3ware 8506-4LP SATA RAID, raid 5
to
FreeBSD 7.1 (RC for now), 9550SXU-4LP, raid 10

We have tested the new installation on ASUS P5K WS motherboard
with PCI-X slot while the server kept running.

The server has Supermicro X5DPE-G2  (pretty old one, 2004).

So, when everything was ready, i just took out the old controller and
disks and installed the new controller and the array disks.

The system booted up, but when i started very intense file operations
the file
system just froze. The weird thing is that any open program which does
not use
filesystem kept running fine. For example, i could type and edit in open
ee editor,
but copying progress bar in midnight commander just stood still. If i
tried to save file
or open file or do anything disk related from ee in another console the
program froze too,
apparently waiting for disk system to reply forever (i tried waiting for
20 minutes).
I could even connect to ssh port, but it does not auth because sshd
needs to read something
from the disk.
I put everything back into Asus P5K WS and tested it. Everything worked
fine again.

Any idea what might going on here?



OS bugs aside, a dead disk that keeps getting IO request explains all 
symptoms. Dead can also mean, faulty cable, buggy connector. I would expect 
the hardware raid controller to pick up on it though and remove it from the 
array.
  
No, not the case here. As i said, the same controller with the same 
disks work perfectly on ASUS motherboard.



--
Artem

___
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


3ware array access lock up on 7.1-RC

2008-12-26 Thread Artem Kuchin

I am not even sure that it is related to freebsd, but maybe someone could
point out the problem.

We wanted to upgrade our hosting server from
FreeBSD 6.2, 3ware 8506-4LP SATA RAID, raid 5
to
FreeBSD 7.1 (RC for now), 9550SXU-4LP, raid 10

We have tested the new installation on ASUS P5K WS motherboard
with PCI-X slot while the server kept running.

The server has Supermicro X5DPE-G2  (pretty old one, 2004).

So, when everything was ready, i just took out the old controller and
disks and installed the new controller and the array disks.

The system booted up, but when i started very intense file operations 
the file
system just froze. The weird thing is that any open program which does 
not use
filesystem kept running fine. For example, i could type and edit in open 
ee editor,
but copying progress bar in midnight commander just stood still. If i 
tried to save file
or open file or do anything disk related from ee in another console the 
program froze too,
apparently waiting for disk system to reply forever (i tried waiting for 
20 minutes).
I could even connect to ssh port, but it does not auth because sshd 
needs to read something

from the disk.
I put everything back into Asus P5K WS and tested it. Everything worked 
fine again.


Any idea what might going on here?

--
Artem



___
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: Strange Out of disk space

2008-06-24 Thread Artem Kuchin

Nejc Škoberne ?:

Hey,


My guess is that something has mmap-ed a HUGE chunk of
disk space. If I reboot the space is freed.


Much more likely is that some program has deleted a large file, while 
still holding it open. Usual suspect is some kind of log file,

or temporary file.


Then I just did mdconfig -d -u /dev/md4 and everything is OK now:

/dev/mirror/gm0s1f 112291390 46935874 56372206 45% /usr

Hope that it maybe helps. :)


Unfortunatelly no, it does not. I don't have md at all, but reboot 
always solves the problem and i still have

no idea how to look at what's eating the disk space.

--
Artem


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


Strange Out of disk space

2008-06-23 Thread Artem Kuchin

Hello!

Look at this:

/dev/da0s1f 104164493 104061031 -8229697   109%/usr

but
du -k -d1 /usr
gives a lot less (about 20GB).

My guess is that something has mmap-ed a HUGE chunk of
disk space. If I reboot the space is freed.

The question is how can i sees what process mmaped how much
space and where?


--
Regards,
Artem
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


how to exec a process in a jail while being on the main host?

2008-04-16 Thread Artem Kuchin
For example, i have an already runing jail with some JID and i am logged 
in on the main host (which runs the jail).
How can i run a new process inside the jail with a known JID w/o ssh-ing 
into that jail or doing a lot of strange

manupulations?

I am asking, because i have about 20 jails running and each has a 
running special control daemon which
changes a lot and often. When change occures i need then to enter each 
jail as root, kill the old daemon, start the new one.

This take a lot of time and is really annoying.

--
Regards,
Artem


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


How to terminate TCP connection?

2005-10-26 Thread Artem Kuchin

Hi!

I am running several jails. Each jail runs many services includinh SMTP, 
POP,IMAP,
HTTP.
Somtimes i need to restart all jails.
So, i /etc/rc.d/jail stop

And then i wait until  jls shows nothing. 


However, it usually takes very long or unacceptably long because
FreebBSD does not delete jail until all connections to it are gone.

So, i have no processes running in a jail, but netstat -n show several
connections (usually SYN_FIN1, SYN_FIN2, LAST_ACK states) and they hang there
for a very long time. Usually, i have to reboot the server to finaly get rid of 
all jails and
connctions. But sometimes I need to restart only one jail and have the same 
problem
and have to wait for 20-30 minutes until all connections die. Clients are ready 
to kill
me at such moments.

So, the question, Is there a way to kill off stuck tcp connection (or actually 
ANY connection
which are shown by netstat) or maybe there is a way to force jail termination 
without
waiting until all connection are gone.

Artem
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Need a network file system with Windows client and freeBSD server

2004-07-14 Thread Artem Kuchin
  I need sime kind of network file system which has a FreeBSD server and
  Windows clients (particulary Windows XP) and that FreeBSD file share
  must be mounted on Windows XP under a drive letter. Windows client
  is FAR FAR away and is behind nat. Traffic costs a lot, so that file
system
  must not waste it for nothing. Of course, security is very important and
  security based on IP address is impossible, because client is behind
nat.
 
  I have checked the following:
 
  1) Samba3
 
  I think i could use it with user security (not share or maybe mixed) but
  i am not sure about making it open to internet and also i think it
wastes
  bandwidth. Am i wrong?

 Don't use Samba.  It's insecure over the Internet, and it's a bandwidth
 hog.  Very nice for 100mb/sec local filesystems, though.

  4) NFS
 
  Well, i like it very much because we use for freebsd file shareing since
  year 2000. Hoever, i could not find free NFS client for Windows (but,
hell,
  i'll buy it) but what's worse i get figure out how to make
authorizartion based on
  user/password and not on /etc/exports. I need something more secure.
Also,
  am not sure about bandwidth usage.

 It's slightly better than SMB, but still has both problems.  If you run it
 over the Internet, you need to do some sort of encrypted tunnel on top.

 I highly recommend setting up sshd on FreeBSD and using WinSCP to move
 files around.  Secure, designed for slow links (thus bandwidth efficient)
 and WinSCP is almost as easy to use as Windows explorer.


So, basically you are saying that there is no solution for what i need?
WinSCP does not suit my needs, because people on windows client must
be able to work on files (mostly html) using different software and it is
not just
about moving then around, but rather editing with special editors and after
editing they must see the result right away on the web server.

i hope i'll find some solution. Your idea about tunnelling is good, i need
to check if i can do it if one end of a tunnel is behind nat.

Artem

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Need a network file system with Windows client and freeBSD server

2004-07-14 Thread Artem Kuchin
  I need sime kind of network file system which has a FreeBSD server
  and Windows clients (particulary Windows XP) and that FreeBSD file
  share must be mounted on Windows XP under a drive letter. Windows
 
 For any of the solutions you describe, you will definitely want to set
 up a VPN between the client and server, and if possible have it
 compress the data.  Never allow raw filesystem access to the entire
 Internet :)

Yes, i understand that. However, i wonder how to make a VPN
with compression and also the scheme is like this:

file server with real ip  - natd - cleints

So, clients do no have real IP addresses and stay behind
nat server which serves many people who are not the clients
of the file server. Is it possible to setup VPN in such situation?

Artem
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Need a network file system with Windows client and freeBSDserver

2004-07-14 Thread Artem Kuchin
 Authorized Windows users mount web folders, which appear as drive 
 letters.  The use of SSL protects the username/password as well as the 
 content in transit.

Um.. what do you mean by 'mount web folders'? Can you really
mount it as a driver letter? How to do it in webdav? (i suppose you
are using web_dav module for apache, right?) I don't think is it
too traffic intensive and i'd like to try it.

Artem
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 3Ware Escalade problem

2004-05-29 Thread Artem Kuchin
I have the same problem on Asus p2bds. But i am just ignoring it and
it has been discussed several time in the past. AFAIK the problem is
that asus p2b is PCI 2.1 and this 3ware controller needs fully
working PCI 2.2. So, you can either patch twe.c to disable the error
message or change your motherboard to something newer. I chose
to patch the twe.c and not see this error ever.

Artem

- Original Message -
From: Frank Mueller [EMAIL PROTECTED]
To: hal [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, May 28, 2004 10:24 PM
Subject: Re: 3Ware Escalade problem


 Hi,

 that sounds very familiar to me. I had exactly the same problems using
3ware Escalade Controllers
 on several older Mainboards. Try using a newer Board with an actual
Chipset and I bet it will
 work fine! I think it's a problem with PCI-Version.

 Greetz,

 Frank


  Here is what my system is telling me.
 
  twe0: unexpected status bit(s) 80PCIPERR
  twe0: PCI parity error: Reseat card, move card or buggy device present.
 
  Here is what I am running.
 
  FreeBSD 4.7 p25
  boot disk IDE
  SCSI tape drive
  twe0 is an Escalade 7500-4
  twe1 is an Escalade 7000-2
 
  I have tried two different 7500-4 cards.
  I have changed slots.
  I have tried 3 different motherboards.
  2 ASUS P2BS
  1 MSI K7 Master-S
 
  What I suspect.
 
  The Escalade 7500-4 is a 64 bit card.  I am using it on
  a 32 bit bus.  The manual doesn't say you can't but I am
  suspicous.  Both 7500-4 cards worked just fine on Linux
  and Windows on both 32 and 64 bit motherboards IIRC.
 
  Is it possible we have a driver issue here?
 
  The machine is a backup server so reliability is important. :^)
  So far I haven't lost any data but..
 
  If you can help great. If you need more info let me know.
 
  hal
 
 
 
  ___
  [EMAIL PROTECTED] mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
[EMAIL PROTECTED]
 

 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]