greptilian logo

IRC log for #javaee, 2013-09-30

Please see http://irclog.greptilian.com/javaee for which days have been logged.

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
03:13 bruce-zu joined ##javaee
03:14 bruce-zu ##java
03:16 pdurbin it's growing on me
03:17 tjsnell you should have that removed
03:17 tjsnell it'll become malignant
03:19 pdurbin in Madison, WI I listened to WORT. the tagline was "it grows on you"
03:20 tjsnell heh
03:26 sfisque and yes TTYS == talk to you soon
03:26 sfisque :-)
03:32 * tjsnell bows
03:50 toshiba joined ##javaee
09:32 jenue joined ##javaee
10:07 jenue joined ##javaee
10:32 Quest joined ##javaee
10:32 Quest I think tomcat has 200 (can be increased to 2000) requests limit. what about jboss or any other free server (maximum limit I mean) ?
10:39 acuzio I think its 2001
10:40 Quest hm
10:45 * Quest waits for seniors
10:47 acuzio i just checked its 1999
10:50 Quest we need not less than 16000 concurent threads limit for requests. we are using 8 tomcat servers on one machine with 2000 limit each with a load balancer / proxy. are there any better options ?
11:08 Quest elaboration = we need not less than 16000 concurent threads limit for requests. we are using 8 tomcat servers on one machine with 2000 limit each with a load balancer / proxy. are there any better options ? we are with hasle. need better ways. why one tomcate cant take 16000 or more.    are there any other servers that can ? jboss?
11:45 Xabster joined ##javaee
12:19 tjsnell uhm, you don't need 16000 concurrent threads
12:20 tjsnell that won't benefit you at all
12:20 tjsnell oh spread over servers
12:21 tjsnell 16k concurrent request is crazy massive load
12:47 jieryn joined ##javaee
12:47 jieryn joined ##javaee
13:05 tjsnell woah!
13:05 tjsnell I didn't see 8 tomcats on ONE server
13:05 tjsnell yikes, that's massive fail
13:05 tjsnell oh damn, he's gone
13:05 pdurbin he'll be back
13:14 acuzio tjsnell: are you stirring up trouble again ?
13:15 tjsnell every chance I get
13:15 acuzio Where are the admins on this channel ?
13:15 acuzio How come i dont have a + before my name ?
13:16 acuzio Why is tjsnell not banned in here ?
13:16 pdurbin heh
13:17 acuzio i am going to take this case up right to the top
13:18 acuzio start a petition or something -
13:19 pdurbin well, the only admin is Fubar^ :)
13:22 tjsnell Fubar^ and I are pals
13:22 acuzio well - goes without saying
13:23 zhee_tuxer joined ##javaee
13:24 Fubar^ i'm not banning anyone!
13:27 Fubar^ And i agree with tjsnell that 16k threads seems a bit excessive :)
13:29 pdurbin Fubar^: want to make sfisque and whartung admins again?
13:30 tjsnell haha
13:30 tjsnell I thought Fubar^ was a bot :)
13:30 Fubar^ hehe :)
13:31 Fubar^ pdurbin: I don't think i can make anyone admin. Ask quest
13:34 pdurbin Fubar^: ok. neuro_sys is a founder so he could probably do it too
13:50 Naros joined ##javaee
13:53 zhee_tuxer joined ##javaee
14:19 sfisque well considering the fact that threads have been native since 1.3, it would be bad to spawn that many threads on an OS.  talk about process starvation
14:36 acuzio sfisque: 1.1 i thought
14:42 sfisque they were added as an option in 1.1 (u could switch between green and native)
14:42 sfisque 1.3 they removed green threads completely
14:43 sfisque the issue was not every OS back in 96 was posix or had posix threads
14:44 acuzio dont remember that far back - but you seem to know this , so i will take your word for it
14:44 sfisque by 2000 every major os had posix thread support
14:44 acuzio but sfisque the important question is - can you kick tjsnell from here ?
14:44 sfisque yeah, 1.1 the added native support.  1.2 native became default on some platforms, 1.3 green was removed
14:44 sfisque i was -o'ed sometime ago.  no op privs
14:45 acuzio damn it sfisque
14:45 * sfisque shrugs
14:45 acuzio so other than Fubar^ and Quest no one has Op privs is it ?
14:45 sfisque it would appear as such.
14:45 acuzio i am deeply disappointed
15:38 Naros like myself, I lurk here and speak up now-and-again but not enough to be oped :)
15:38 Naros work comes before irc :P
15:40 sfisque aye.  and personally, i don't have the time to become familiar with all the nuts and bolts of "Op-ing" a channel.  i know enough to function as a user, and that's alright by me :-)
15:40 Naros yeppers
15:45 [[thufir]] joined ##javaee
15:49 acuzio nonsense-  irc is life surely
15:52 Naros LOL
15:57 ariel__ joined ##javaee
15:59 ariel__ hello
16:00 Fubar^ hi
16:02 ariel__ my eclipse luna no funcina with java jdk 8
16:02 ariel__ in ubuntu 13.04
16:02 ariel__ help
16:02 ariel__ my english is so so
16:03 Fubar^ any errors?
16:05 ariel__ my eclipse does not work with ubuntu 13.10 java 8 open wide and start editing errors I closes
16:07 Fubar^ what are the errors?
16:07 ariel__ The Eclipse executable launcher was unable to locate its
16:07 ariel__ companion shared library.
16:09 Fubar^ maybe try reinstalling
16:26 ariel__ left ##javaee
17:42 Quest joined ##javaee
17:45 Quest tjsnell,  I saw your comments on chat logs about the tomcat. i was disconnected. sory
17:46 Quest am. any senior arround?
17:46 manish_chhabra joined ##javaee
17:54 Naros What's up Quest?
17:54 Quest hey!
17:54 Quest Naros,  well, sharing views here. did that in an other channel in the morning too.
17:55 Quest we need not less than 16000 concurent threads limit for requests. we are using 8 tomcat servers on one machine with 2000 limit each with a load balancer / proxy. are there any better options ?elaboration = we need not less than 16000 concurent threads limit for requests. we are using 8 tomcat servers on one machine with 2000 limit each with a load balancer / proxy. are there any better options ? we are with hasle. need better ways. why one tomcate cant t
17:55 Quest ake 16000 or more.    are there any other servers that can ? jboss? or changing the mentioned strategy?
17:55 Naros on a single server?
17:55 Quest yup
17:55 Naros how many cores are you throwing at the machine?
17:56 Quest 8
17:56 Fubar^ What makes you think you need 16k threads?
17:56 Naros You believe you're going to have 16k users simultaneously doing stuff on the server at precisely the same moment in time?
17:56 Quest Fubar^,  hard stats. becuase 14000 are used right now
17:57 Quest Naros,  yes. Fubar^  we have very huge trafic
17:57 Naros That's a lot for 1 machine to handle not to mention the fact that regardless of load balancing, you've got a single point of failure.
17:57 Quest no. Naros  its not the hardware issue. its the software bottleneck
17:57 Naros I understand that, but making 1 machine handle 16,000 threads is overworking a tiny 8 core processor
17:58 Quest if we run one tomcat on that machine. it cant serve
17:58 Quest so we have to do 8
17:58 Naros Create 8 servers
17:58 Quest all is fine now. but
17:58 Fubar^ What is the bottleneck then, are you sure it's the amount of threads?
17:58 Naros each running an instance of tomcat.
17:58 Quest 8 machines ?
17:58 Naros Yes
17:58 Quest Fubar^,  Naros  whats the max core machine available
17:58 Naros Assuming each core is 2 hardware threads, that gives you 16x8 hardware threads of simultaneous operations.
17:59 sfisque Q i would first find out what the optimal thread pool size is for the cpu/OS combination you are running.  then tune that way.  i'm guessing you are overtaxing what the OS can schedule
18:00 Naros so while you might take 16k connections / 8 servers = 2000 threads per machine - you'd still be limited to running 16 threads at precisely the same nanosecond of computation.
18:00 sfisque remember, each thread has an overhead cost that the kernel and OS have to pay
18:00 Quest ok
18:00 Quest 8 machines ?
18:00 Quest sory. ignore 6
18:00 Quest ^
18:00 Quest Fubar^,  Naros  whats the max core machine available
18:00 Fubar^ Quest: Have you actually done any profiling on this? All time is probably spent context switching
18:00 Naros Quest, in most cases you split your load up across multiple servers to give you the max capacity you need without overtaxing a particular machine's CPU operations.
18:01 Naros e.g. cluster
18:01 Naros but as fubar indicated, you arrive at the max capacity and number of servers based on profiling the application's usage.
18:01 Quest I think its not the machine issue. as its serving 14000 at one time now. and can boost to 30000
18:02 Naros 14,000 threads on a single machine feels wrong
18:02 Naros your cpu is context switching like a crazy horse
18:02 sfisque and to be honest, unless you are running somekind of realtime hub (chat server?) i would argue that you can probably cut the thread pool way down.  ultimately, if a user has to wait 0.25 seconds for a thread to be freed up in a pool, i do no think they will care
18:02 Naros assuming those threads are all busy at some capacity
18:03 Naros We handle well over 15,000 concurrent users with a thread pool of around 325
18:03 Naros on a single instance
18:03 Quest Fubar^,  Naros  yes. mee too. some one advised me to use async and reactor pattern with only 200 threads instead of 16000.   200 with async will serve more than 16000.  now why is that?
18:03 Quest sfisque,  it is similar to chat server
18:03 Quest its not a web server
18:04 Naros A request comes in, gets dispatched to an internal queue.
18:04 Naros Then another dispatcher processes this queue
18:04 sfisque aye, decouple the thread from the handling
18:04 Naros When the queue element gets processsed, it puts it back on another queue to be delivered to the caller.
18:04 sfisque so you can do multiple feeder / worker queues
18:04 Naros Caller (original dispatcher) feeds the data to the socket
18:05 Quest Naros,  but...... the requestS coming IN needs to be in some concurrent threads. those are 16000
18:05 Naros this way your responding to sockets as quickly as possible, doing the I/O and other computation asynchronously as it finishes.
18:05 Naros You can accept 16k connections, that isn't the issue
18:05 Naros But each connection shouldn't be a 1=1 thread
18:05 Quest hm. decoupling
18:06 Naros This is pretty much server programming 101 :P
18:06 sfisque keep in mind Q, not every connection is doing i/O at exactly the same time, and if they need it, they can block until a thread frees up
18:06 sfisque if a user has to block for a fraction of a second, they won't care
18:06 Naros nor will they be able to notice it in most cases.
18:06 * sfisque nods to naros
18:07 sfisque well, i'm out, gotta pick up one of the spawnlings… code strong!
18:07 Quest hm
18:07 Naros My MMO server alone in C++ can handle upwards of 20k connections per instance but uses only 16 threads for internal thread pool work
18:08 Naros key is to make sure that the jobs you dispatch to the thread pool are small in nature and fully async
18:08 Naros e.g. decoupling the network layer from the I/O and processing layer
18:08 Naros which is what your suggestion of using reactor pattern means
18:09 Quest how much delay time will be expected for A)  15,000 concurrent users with a thread pool of around 325         B) 15000 actual threads with 8 tomcats with a load balancer
18:09 Naros Acceptable delay is a business question :)
18:09 Fubar^ That's not enough information to expect anything
18:09 Quest which one will be faster. A or B
18:10 Naros Do you have 15k users doing something at the exact same nano-second?
18:10 Quest yes. yes..
18:10 Naros Or just that 15k users are connected but aren't sending messages at the same nanosecond?
18:10 Quest thats the issue..
18:10 Quest 15k doing stuf
18:10 Quest its a chat/ xml based update for cricket matches
18:10 Naros To find the answer to your question, it's called profiling :P
18:10 Quest you know. comentry. ads,
18:10 Quest score updates
18:11 Naros Setup one instance with the scaled back parameters.
18:11 Quest hm
18:11 Naros Then setup a second one and tune and continue this until you get optimal throughput without overtaxing your hardware.
18:11 Quest Fubar^,  Naros  sfisque  ok. your strategy is very much understandable, and I appreciate. where can i start learning? what keywords?
18:12 Naros Not sure I can offer keywords Quest.
18:13 Naros I mean this is performance tuning
18:13 Naros of a server application based on network load and user load
18:13 Quest what settings should i change in tomcat
18:13 Naros I believe in server.xml is where you can specify the number of threads right?
18:14 Quest how can i decouple the request and response
18:14 Naros max idle thread count, etc.
18:14 Quest ok.
18:14 Quest and ?
18:15 Naros I'd have to research precisely how tomcat handles maxThreads
18:15 Naros I'm not sure whether its designed in a true reactor pattern or not.
18:15 Quest well max threads setting is no issue
18:16 Quest the issue is making a threadpool with request / response decoupled
18:16 Naros Which i don't believe tomcat can do for you.
18:16 Naros A custom web server would
18:16 Quest what settings would have to be changed in order to do that?
18:17 Naros Tomcat accepts connection, dispatches it to a thread and lets it operate until it finishes.
18:17 Naros I'm not entirely sure Tomcat can support that is what I am saying Quest.
18:17 Naros Not in a decoupled fashion.
18:17 Quest Naros,  which server do  you know can do it?
18:17 Quest jboss?
18:18 Fubar^ netty i think
18:18 Quest so theres no one line answer
18:18 Naros The reactor code I have is C++, not java and is a custom built server platform.  In our java app, we just tune the web server settings based on user load and statistics we've gathered.
18:18 Quest Naros,  you said you have tuned your server for 325 thread entertaining 15000. how did you do that?
18:18 Naros Making sure that the settings for the java environment exceed the user's demand.
18:19 Naros 3 servers, each with 325 threads
18:19 Quest oh ok
18:19 Quest 3 servers each with 325 threads entertain how  much users?
18:19 Naros But keep in mind, the user requests are HTTP, so short lived type stuff
18:20 Naros Our current user load is 15k users and those 3 servers far exceed that load presently.
18:20 Quest hm
18:20 Quest ok
18:20 Quest Naros,  will that be same for a chat service too?
18:20 Naros doubtful, different application with different requirements.
18:20 Quest where each user cant wait more than 1 or 2 seconds
18:21 Quest hm ok
18:21 Quest great help
18:21 Naros again, i'm talking purely from a web application world
18:21 Quest last silly questions.  how is embeded objects normally fetched and outputted to html . heres a small spring controller snippet in which a board has boxes and each box may have n number of sub child boxes and each box may have tasks too (sticky notes .). all are objects. http://pastebin.com/yPscDEps    i dont know how many boxes each board/ box may have. how to auto get them.  thats first question. lets go to the second later
18:22 Fubar^ just loop over the boxes? What are you actually asking?
18:23 Quest i dont know how many boxes each board/ box may have. how to auto get them.  thats first question. lets go to the second later
18:23 Naros With that type of hierarchy of data, I usually loop over the data in the controller and construct a DTO type object that I can very easily iterate over in the web UI without too many inner loops, etc
18:23 Quest DTO?
18:23 Naros We did something similar with a multi-tiered tree of data.  So I gathered the data in the controller and created a single object that represented the view since the data wasn't view friendly.
18:24 Quest Fubar^,  Naros  as i dont know how many boxes / task would be in one box and so on. i have to embed objects in lists
18:24 Naros DTO = Data Transfer Object or some people call them VO = Value Objects or others prefer Model
18:25 Naros Right get the lists and then you can use list.size() to determine the count.  but keep in mind that if the list size is indeterminate, paging may be useful here.
18:25 Naros or dynamically loading additional rows as the user scrolls
18:25 Naros using jquery/ajax
18:25 Naros i wouldn't want to load a page that contains 1000s of rows :P
18:26 Quest pagination is not a problem here
18:26 Quest http://stackoverflow.com/questions/7722291/data-transfer-object-sample-in-java       this?
18:26 Naros conceptually yes
18:26 Naros sometimes you store data in a normalized fashion in the database right?
18:26 Quest its just a simple class
18:27 Naros but the view may need it denormalized.
18:27 Naros so you load it using proper joins and such and shove it into a single object that mimics the view :)
18:27 Quest so my class would just have 2 variables.         a box and a task.
18:28 Naros Sounds like a board contains a list of boxes, each box containing a list of boxes. And each box could have tasks.
18:29 Naros At the base level some object takes a list of boxes and a list of tasks
18:29 Naros The level up takes a list of those base level objects
18:29 Naros But design the dto around your view :P
18:29 Naros Not the data itself
18:30 Naros Will save you from scripting stuff in the jsp
18:31 Naros but you can do all this using the el-tags and no DTOs too
18:31 Quest hm
18:31 Naros if you want your jsp to have iteration logic of your domain classes
18:31 Quest wil show you code soon
18:31 Naros but i dislike that approach because if the domain model changes for any reason, the view will too
18:32 Naros and its been my experience the view stays the same but i want to optimize the domain model or view changes but domain model remains the same.
18:33 Naros and anywhere I can encapsulate things I do
19:30 SoniEx2 joined ##javaee
19:59 Quest joined ##javaee
20:40 SoniEx2 joined ##javaee
20:40 SoniEx2 joined ##javaee
20:43 SoniEx joined ##javaee

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

Please see http://irclog.greptilian.com/javaee for which days have been logged.